open-iscsi / target-isns

Target-isns is an iSNS client for the Linux LIO iSCSI target
GNU General Public License v2.0
16 stars 19 forks source link

_BSD_SOURCE define is deprecated, newer compiler complains #11

Closed gonzoleeman closed 9 years ago

gonzoleeman commented 9 years ago

I found that in openSUSE Factory, the define of _BSD_SOURCE in src/log.c causes /usr/include/feature.h to complain, e.g.:

/* _BSD_SOURCE and _SVID_SOURCE are deprecated aliases for _DEFAULT_SOURCE. If _DEFAULT_SOURCE is present we do not issue a warning; the expectation is that the source is being transitioned to use the new macro. */

if (defined _BSD_SOURCE || defined _SVID_SOURCE) \

&& !defined _DEFAULT_SOURCE

warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

undef _DEFAULT_SOURCE

define _DEFAULT_SOURCE 1

endif

So define _DEFAULT_SOURCE in src/log.c instead of _BSD_SOURCE?

cvubrugier commented 9 years ago

Sorry for the delay and thank you for reporting this issue.