aboutsummaryrefslogtreecommitdiffstats
path: root/package/osiris/patches/02-osirisd-pidfile.patch
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2006-03-28 00:05:52 +0000
committerNicolas Thill <nico@openwrt.org>2006-03-28 00:05:52 +0000
commitcbd8d7f93d1939ad706633c485b6e501b701aa24 (patch)
tree42063e02086812530bec6bc7ecedf39016c081a7 /package/osiris/patches/02-osirisd-pidfile.patch
parent421ec10314cfbcd876395c40eb4e0544a7d99501 (diff)
downloadmaster-187ad058-cbd8d7f93d1939ad706633c485b6e501b701aa24.tar.gz
master-187ad058-cbd8d7f93d1939ad706633c485b6e501b701aa24.tar.bz2
master-187ad058-cbd8d7f93d1939ad706633c485b6e501b701aa24.zip
update osiris to v4.2.0, add mod_if module, add short desc to mod_* patches,
fix openssl-related build issue (could break compatibility). git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3515 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/osiris/patches/02-osirisd-pidfile.patch')
-rw-r--r--package/osiris/patches/02-osirisd-pidfile.patch68
1 files changed, 68 insertions, 0 deletions
diff --git a/package/osiris/patches/02-osirisd-pidfile.patch b/package/osiris/patches/02-osirisd-pidfile.patch
new file mode 100644
index 0000000000..80c52dbf1a
--- /dev/null
+++ b/package/osiris/patches/02-osirisd-pidfile.patch
@@ -0,0 +1,68 @@
+--- osiris-4.1.8-orig/src/osirisd/osirisd.c 2005-04-14 01:00:55.000000000 +0200
++++ osiris-4.1.8-1/src/osirisd/osirisd.c 2005-04-22 23:11:32.000000000 +0200
+@@ -218,6 +218,8 @@
+
+ #ifdef USE_PRIVSEP
+ rootpriv_setup_pidfile();
++#else
++ setup_pidfile();
+ #endif
+
+ process();
+--- osiris-4.1.8-orig/src/osirisd/rootpriv.c 2005-04-14 00:55:59.000000000 +0200
++++ osiris-4.1.8-1/src/osirisd/rootpriv.c 2005-04-22 23:25:10.000000000 +0200
+@@ -35,6 +35,10 @@
+ #include "logging.h"
+ #include "rootpriv.h"
+
++#ifndef WIN32
++extern char pid_file[MAX_PATH_LENGTH];
++#endif
++
+ #ifdef USE_PRIVSEP
+
+ /* this is defined in regex, and sometimes conflicts with stuff */
+@@ -80,10 +84,6 @@
+ extern pid_t child_pid;
+ extern int rootpriv_pipe[2]; /* socketpair used for rootpriv comm. */
+
+-#ifndef WIN32
+-extern char pid_file[MAX_PATH_LENGTH];
+-#endif
+-
+ #define INCOMING_ROOT_REQUEST() ( FD_ISSET( rootpriv_pipe[1], &root_read_set ) )
+
+
+@@ -292,17 +292,6 @@
+ #endif
+ }
+
+-void setup_pidfile()
+-{
+- FILE *pidfile = fopen( pid_file, "wb" );
+-
+- if( pidfile != NULL )
+- {
+- fprintf( pidfile, "%ld\n", (long)getpid() );
+- fclose( pidfile );
+- }
+-}
+-
+ void handle_signals()
+ {
+ pid_t pid;
+@@ -789,3 +778,14 @@
+
+ #endif /* USE_PRIVSEP */
+
++void setup_pidfile()
++{
++ FILE *pidfile = fopen( pid_file, "wb" );
++
++ if( pidfile != NULL )
++ {
++ fprintf( pidfile, "%ld\n", (long)getpid() );
++ fclose( pidfile );
++ }
++}
++