#include <fcntl.h>
#include "klibc_fixups.h"
#include <sys/sysinfo.h>
+#include <sys/stat.h>
#include "list.h"
#include "udev.h"
return;
}
-asmlinkage static void sig_handler(int signum)
+static void asmlinkage sig_handler(int signum)
{
int rc;
/* set signal handlers */
- act.sa_handler = sig_handler;
+ act.sa_handler = (void (*) (int))sig_handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_RESTART;
sigaction(SIGINT, &act, NULL);
exit(1);
}
+ set_cloexec_flag(ssock, 1);
+
/* the bind takes care of ensuring only one copy running */
retval = bind(ssock, (struct sockaddr *) &saddr, addrlen);
if (retval < 0) {