summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
authorvenaas <venaas>2008-02-19 14:12:26 +0000
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>2008-02-19 14:12:26 +0000
commit1932be8fffa9c6a1e3b6df17f51f3e29746cb7f4 (patch)
tree853cc596c87d161f60a84ca022f1f53bbccf7183 /radsecproxy.c
parent4f214a98e413b6d19aa536d5735f722d453d2280 (diff)
Solaris9 fixes
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@214 e88ac4ed-0b26-0410-9574-a7f39faa03bf
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 2f3c99b..f6cbaa1 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -34,6 +34,9 @@
#include <netdb.h>
#include <string.h>
#include <unistd.h>
+#ifdef SYS_SOLARIS9
+#include <fcntl.h>
+#endif
#include <sys/time.h>
#include <sys/types.h>
#include <arpa/inet.h>
@@ -2768,6 +2771,23 @@ void getargs(int argc, char **argv, uint8_t *foreground, uint8_t *pretend, uint8
exit(1);
}
+#ifdef SYS_SOLARIS9
+int daemon(int a, int b) {
+ int i;
+
+ if (fork())
+ exit(0);
+
+ setsid();
+
+ for (i = 0; i < 3; i++) {
+ close(i);
+ open("/dev/null", O_RDWR);
+ }
+ return 1;
+}
+#endif
+
int main(int argc, char **argv) {
pthread_t udpserverth, udpaccserverth, udpclient4rdth, udpclient6rdth;
struct list_node *entry;