[ppp] Make patches apply agagin.
[openwrt-10.03/.git] / package / ppp / patches / 102-debian_fix_close_fd0.patch
1 diff -Naur ppp-2.4.4.orig/pppd/main.c ppp-2.4.4/pppd/main.c
2 --- ppp-2.4.4.orig/pppd/main.c  2009-05-07 15:49:34.000000000 -0400
3 +++ ppp-2.4.4/pppd/main.c       2009-05-07 15:53:42.000000000 -0400
4 @@ -1570,6 +1570,8 @@
5         if (errfd == 0 || errfd == 1)
6                 errfd = dup(errfd);
7  
8 +       closelog();
9 +
10         /* dup the in, out, err fds to 0, 1, 2 */
11         if (infd != 0)
12                 dup2(infd, 0);
13 @@ -1578,7 +1580,6 @@
14         if (errfd != 2)
15                 dup2(errfd, 2);
16  
17 -       closelog();
18         if (log_to_fd > 2)
19                 close(log_to_fd);
20         if (the_channel->close)