1 |
patrick 09/03/01 19:58:56 |
2 |
|
3 |
Added: netplug-1.2.9-warn_unused_result_write_call.patch |
4 |
netplug-1.2.9-remove-werror.patch |
5 |
Log: |
6 |
Fix for gcc 4.3.3 / fortify_sources, remove -Werror from Makefile. Patches by Romain Perier and Magnus Granberg. |
7 |
(Portage version: 2.2_rc23/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/netplug/files/netplug-1.2.9-warn_unused_result_write_call.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: netplug-1.2.9-warn_unused_result_write_call.patch |
16 |
=================================================================== |
17 |
--- ../netplug-1.2.9_orig/main.c 2005-01-08 06:57:09.000000000 +0100 |
18 |
+++ main.c 2009-02-07 11:30:37.017300663 +0100 |
19 |
@@ -155,13 +155,22 @@ |
20 |
{ |
21 |
struct child_exit ce; |
22 |
int ret; |
23 |
+ ssize_t s = 0; |
24 |
|
25 |
assert(sig == SIGCHLD); |
26 |
|
27 |
ce.pid = info->si_pid; |
28 |
ret = waitpid(info->si_pid, &ce.status, 0); |
29 |
if (ret == info->si_pid) |
30 |
- write(child_handler_pipe[1], &ce, sizeof(ce)); |
31 |
+ { |
32 |
+ s = write(child_handler_pipe[1], &ce, sizeof(ce)); |
33 |
+ |
34 |
+ if (s == -1) |
35 |
+ { |
36 |
+ do_log(LOG_ERR, "can't write into pipe"); |
37 |
+ exit(1); |
38 |
+ } |
39 |
+ } |
40 |
} |
41 |
|
42 |
/* Poll the existing interface state, so we can catch any state |
43 |
|
44 |
|
45 |
|
46 |
1.1 sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-apps/netplug/files/netplug-1.2.9-remove-werror.patch?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: netplug-1.2.9-remove-werror.patch |
52 |
=================================================================== |
53 |
--- Makefile 2009-02-25 23:31:40.000000000 +0000 |
54 |
+++ Makefile 2009-02-25 23:30:52.000000000 +0000 |
55 |
@@ -9,7 +9,7 @@ |
56 |
|
57 |
install_opts := |
58 |
|
59 |
-CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ |
60 |
+CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \ |
61 |
-DNP_SCRIPT_DIR='"$(scriptdir)"' -DNP_VERSION='"$(version)"' |
62 |
|
63 |
netplugd: config.o netlink.o lib.o if_info.o main.o |