ifdef away GNU libc extensions and use a POSIXly correct pointer type
strncpy(ifr.ifr_name, net->if_name, sizeof(ifr.ifr_name));
ifr.ifr_mtu = mtu;
- err = ioctl(sk, SIOCSIFMTU, (caddr_t) &ifr);
+ err = ioctl(sk, SIOCSIFMTU, (void *) &ifr);
close(sk);
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
+#ifdef __GLIBC__
#include <execinfo.h>
+#endif
#include <dlfcn.h>
#include "ofono.h"
va_end(ap);
}
+#ifdef __GLIBC__
static void print_backtrace(unsigned int offset)
{
void *frames[99];
sigaction(SIGABRT, &sa, NULL);
sigaction(SIGPIPE, &sa, NULL);
}
+#endif
extern struct ofono_debug_desc __start___debug[];
extern struct ofono_debug_desc __stop___debug[];
if (detach == FALSE)
option |= LOG_PERROR;
+#ifdef __GLIBC__
signal_setup(signal_handler);
+#endif
openlog(basename(program), option, LOG_DAEMON);
closelog();
+#ifdef __GLIBC__
signal_setup(SIG_DFL);
+#endif
g_strfreev(enabled);
}