Page MenuHomeFreeBSD

Define ipfilter's SOLARIS macro in a more portable way
ClosedPublic

Authored by dim on Aug 27 2016, 10:17 PM.
Tags
None
Referenced Files
F85450558: D7671.diff
Thu, Jun 6, 6:48 AM
F85392678: D7671.diff
Wed, Jun 5, 11:55 AM
Unknown Object (File)
Thu, May 23, 5:44 PM
Unknown Object (File)
May 2 2024, 9:42 AM
Unknown Object (File)
May 2 2024, 4:59 AM
Unknown Object (File)
May 2 2024, 4:57 AM
Unknown Object (File)
May 2 2024, 4:38 AM
Unknown Object (File)
May 2 2024, 4:37 AM
Subscribers

Details

Summary

From clang 3.9.0 I'm getting this warning about ipfilter's SOLARIS
macro:

In file included from ioctl.c:82:
/usr/obj/usr/src/tmp/usr/include/netinet/ip_fil.h:1080:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
# if    SOLARIS
        ^
/usr/obj/usr/src/tmp/usr/include/netinet/ip_compat.h:35:18: note: expanded from macro 'SOLARIS'
#define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4)))
                 ^

This can easily be done in a defined and portable way.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 4956
Build 5021: arc lint + arc unit

Event Timeline

dim retitled this revision from to Define ipfilter's SOLARIS macro in a more portable way.
dim updated this object.
dim edited the test plan for this revision. (Show Details)
dim added reviewers: cy, glebius.
dim added a subscriber: emaste.
cy edited edge metadata.

Looks good.

Ultimately as I go through the code, all non-FreeBSD code will be removed. This works for now. Thanks.

This revision is now accepted and ready to land.Aug 27 2016, 11:57 PM
This revision was automatically updated to reflect the committed changes.