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
Unknown Object (File)
Thu, May 2, 9:42 AM
Unknown Object (File)
Thu, May 2, 4:59 AM
Unknown Object (File)
Thu, May 2, 4:57 AM
Unknown Object (File)
Thu, May 2, 4:38 AM
Unknown Object (File)
Thu, May 2, 4:37 AM
Unknown Object (File)
Thu, May 2, 12:07 AM
Unknown Object (File)
Wed, May 1, 8:53 PM
Unknown Object (File)
Wed, May 1, 8:35 PM
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
Lint Not Applicable
Unit
Tests Not Applicable

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.