We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When trying to make in macOS, I get this error:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am CC mini_snmpd-mini-snmpd.o mini-snmpd.c:506:13: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations] if (-1 == daemon(0, 0)) { ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:297:6: note: 'daemon' has been explicitly marked deprecated here int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; ^ mini-snmpd.c:592:51: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:34: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ mini-snmpd.c:592:18: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:29: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ mini-snmpd.c:592:18: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:56: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:39:54: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^~~~~~ mini-snmpd.c:593:44: error: use of undeclared identifier 'SO_BINDTODEVICE' if (setsockopt(g_udp_sockfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&ifreq, sizeof(ifreq)) == -1) { ^ mini-snmpd.c:609:51: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:34: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ mini-snmpd.c:609:18: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:29: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ mini-snmpd.c:609:18: error: no member named 'ifr_ifrn' in 'struct ifreq' snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device); ~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:56: note: expanded from macro 'snprintf' __builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS) ^~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:39:54: note: expanded from macro '__darwin_obsz' #define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0) ^~~~~~ mini-snmpd.c:610:44: error: use of undeclared identifier 'SO_BINDTODEVICE' if (setsockopt(g_tcp_sockfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&ifreq, sizeof(ifreq)) == -1) { ^ 1 warning and 8 errors generated. make[1]: *** [mini_snmpd-mini-snmpd.o] Error 1 make: *** [all] Error 2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When trying to make in macOS, I get this error:
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC mini_snmpd-mini-snmpd.o
mini-snmpd.c:506:13: warning: 'daemon' is deprecated: first deprecated in macOS 10.5 - Use posix_spawn APIs instead. [-Wdeprecated-declarations]
if (-1 == daemon(0, 0)) {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdlib.h:297:6: note: 'daemon' has been explicitly marked deprecated here
int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED;
^
mini-snmpd.c:592:51: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:34: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
mini-snmpd.c:592:18: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:29: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
mini-snmpd.c:592:18: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:56: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:39:54: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^~~~~~
mini-snmpd.c:593:44: error: use of undeclared identifier 'SO_BINDTODEVICE'
if (setsockopt(g_udp_sockfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&ifreq, sizeof(ifreq)) == -1) {
^
mini-snmpd.c:609:51: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:34: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
mini-snmpd.c:609:18: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:29: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
mini-snmpd.c:609:18: error: no member named 'ifr_ifrn' in 'struct ifreq'
snprintf(ifreq.ifr_ifrn.ifrn_name, sizeof(ifreq.ifr_ifrn.ifrn_name), "%s", g_bind_to_device);
~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_stdio.h:57:56: note: expanded from macro 'snprintf'
__builtin___snprintf_chk (str, len, 0, __darwin_obsz(str), VA_ARGS)
^~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/secure/_common.h:39:54: note: expanded from macro '__darwin_obsz'
#define __darwin_obsz(object) __builtin_object_size (object, _USE_FORTIFY_LEVEL > 1 ? 1 : 0)
^~~~~~
mini-snmpd.c:610:44: error: use of undeclared identifier 'SO_BINDTODEVICE'
if (setsockopt(g_tcp_sockfd, SOL_SOCKET, SO_BINDTODEVICE, (char *)&ifreq, sizeof(ifreq)) == -1) {
^
1 warning and 8 errors generated.
make[1]: *** [mini_snmpd-mini-snmpd.o] Error 1
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: