]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
[PATCH] fix incompatible pointer type warning
authormbuesch@freenet.de <mbuesch@freenet.de>
Thu, 14 Oct 2004 05:37:59 +0000 (22:37 -0700)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:53:22 +0000 (21:53 -0700)
This patch fixes two
warning: assignment from incompatible pointer type

asmlinkage is the reason for the warning. We can
simply cast to avoid it.

It also fixes this warning:
warning: implicit declaration of function `umask'

udev.c
udevd.c

diff --git a/udev.c b/udev.c
index 974b9582d0723440f218249263ee82f1c1f5ae3c..78da715fec2b5459bab639a7c7b42d64befb3b8c 100644 (file)
--- a/udev.c
+++ b/udev.c
@@ -153,7 +153,7 @@ int main(int argc, char *argv[], char *envp[])
        }
 
        /* set signal handlers */
-       act.sa_handler = sig_handler;
+       act.sa_handler = (void (*) (int))sig_handler;
 
        sigemptyset (&act.sa_mask);
        /* alarm must interrupt syscalls*/
diff --git a/udevd.c b/udevd.c
index 81f4474a89b6bc7df5ddd834cff3180d0cb12bdf..380511d47eb24380d12812a141fe1cf2fc4c5345 100644 (file)
--- a/udevd.c
+++ b/udevd.c
@@ -35,6 +35,7 @@
 #include <fcntl.h>
 #include "klibc_fixups.h"
 #include <sys/sysinfo.h>
+#include <sys/stat.h>
 
 #include "list.h"
 #include "udev.h"
@@ -457,7 +458,7 @@ int main(int argc, char *argv[])
 
        
        /* 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);