From e9b83da27b326f7b2aaf48ac158bb8583d38eb04 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Mar 16 2005 22:54:41 +0000 Subject: someone decided to build with -Werror. shut it up. --- diff --git a/acpid-1.0.4-warning.patch b/acpid-1.0.4-warning.patch new file mode 100644 index 0000000..bb8f3df --- /dev/null +++ b/acpid-1.0.4-warning.patch @@ -0,0 +1,33 @@ +--- acpid-1.0.4/ud_socket.c.warning 2003-11-17 16:24:58.000000000 -0500 ++++ acpid-1.0.4/ud_socket.c 2005-03-16 17:51:40.000000000 -0500 +@@ -58,7 +58,7 @@ + while (1) { + int newsock = 0; + struct sockaddr_un cliaddr; +- int len = sizeof(struct sockaddr_un); ++ size_t len = sizeof(struct sockaddr_un); + + newsock = accept(listenfd, (struct sockaddr *)&cliaddr, &len); + if (newsock < 0) { +--- acpid-1.0.4/acpid.c.warning 2004-10-17 18:33:51.000000000 -0400 ++++ acpid-1.0.4/acpid.c 2005-03-16 17:52:23.000000000 -0500 +@@ -61,7 +61,7 @@ + main(int argc, char **argv) + { + int event_fd; +- int sock_fd; ++ int sock_fd = -1; + + /* learn who we really are */ + progname = (const char *)strrchr(argv[0], '/'); +@@ -386,9 +386,7 @@ + umask(0); + + /* get outta the way */ +- chdir("/"); +- +- return 0; ++ return chdir("/"); + } + + static int diff --git a/acpid.spec b/acpid.spec index f7592bd..1f0d8b9 100644 --- a/acpid.spec +++ b/acpid.spec @@ -9,6 +9,7 @@ Source1: acpid.logrotate Source2: acpid.init Patch1: acpid-1.0.3-conf.patch Patch2: acpid-1.0.3-makefile.patch +Patch3: acpid-1.0.4-warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-root ExclusiveArch: ia64 x86_64 %{ix86} URL: http://acpid.sourceforge.net/ @@ -21,8 +22,9 @@ acpid is a daemon that dispatches ACPI events to user-space programs. %prep %setup -%patch1 -p1 -%patch2 -p1 +%patch1 -p1 -b .conffile +%patch2 -p1 -b .makefile +%patch3 -p1 -b .warning %build make