Mon, 25 Aug 2014 19:06:31 +0200
Import package vendor original specs for necessary manipulations.
michael@795 | 1 | Index: MCONFIG.in |
michael@795 | 2 | --- MCONFIG.in.orig 2011-06-23 01:32:56.000000000 +0200 |
michael@795 | 3 | +++ MCONFIG.in 2011-06-24 20:54:05.000000000 +0200 |
michael@795 | 4 | @@ -21,6 +21,7 @@ |
michael@795 | 5 | # Prefixes |
michael@795 | 6 | prefix = @prefix@ |
michael@795 | 7 | exec_prefix = @exec_prefix@ |
michael@795 | 8 | +datarootdir = @datarootdir@ |
michael@795 | 9 | |
michael@795 | 10 | # Directory for user binaries |
michael@795 | 11 | BINDIR = @bindir@ |
michael@795 | 12 | Index: Makefile |
michael@795 | 13 | --- Makefile.orig 2011-06-23 01:32:56.000000000 +0200 |
michael@795 | 14 | +++ Makefile 2011-06-24 20:54:05.000000000 +0200 |
michael@795 | 15 | @@ -59,9 +59,9 @@ |
michael@795 | 16 | # Adding "configure" to the dependencies serializes this with running |
michael@795 | 17 | # autoconf, because there are apparently race conditions between |
michael@795 | 18 | # autoconf and autoheader. |
michael@795 | 19 | -aconfig.h.in: configure.in configure aclocal.m4 |
michael@795 | 20 | - rm -f aconfig.h.in aconfig.h |
michael@795 | 21 | - autoheader |
michael@795 | 22 | +#aconfig.h.in: configure.in configure aclocal.m4 |
michael@795 | 23 | +# rm -f aconfig.h.in aconfig.h |
michael@795 | 24 | +# autoheader |
michael@795 | 25 | |
michael@795 | 26 | configure: configure.in aclocal.m4 |
michael@795 | 27 | rm -rf MCONFIG configure config.log aconfig.h *.cache |
michael@795 | 28 | Index: tftpd/tftpd.c |
michael@795 | 29 | --- tftpd/tftpd.c.orig 2011-06-23 01:32:56.000000000 +0200 |
michael@795 | 30 | +++ tftpd/tftpd.c 2011-06-24 20:54:05.000000000 +0200 |
michael@795 | 31 | @@ -33,6 +33,9 @@ |
michael@795 | 32 | * SUCH DAMAGE. |
michael@795 | 33 | */ |
michael@795 | 34 | |
michael@795 | 35 | +#if defined(__NetBSD__) |
michael@795 | 36 | +#define _NETBSD_SOURCE |
michael@795 | 37 | +#endif |
michael@795 | 38 | #include "config.h" /* Must be included first */ |
michael@795 | 39 | #include "tftpd.h" |
michael@795 | 40 | |
michael@795 | 41 | @@ -767,6 +770,22 @@ |
michael@795 | 42 | #ifndef __CYGWIN__ |
michael@795 | 43 | set_socket_nonblock(fd, 1); |
michael@795 | 44 | #endif |
michael@795 | 45 | +#ifdef PID_FILE |
michael@795 | 46 | + /* Write PID file */ |
michael@795 | 47 | + { |
michael@795 | 48 | + mode_t old_umask; |
michael@795 | 49 | + pid_t pid; |
michael@795 | 50 | + FILE *fp; |
michael@795 | 51 | + |
michael@795 | 52 | + old_umask = umask((mode_t) 0022); |
michael@795 | 53 | + pid = getpid(); |
michael@795 | 54 | + if ((fp = fopen(PID_FILE, "w")) == NULL) |
michael@795 | 55 | + syslog(LOG_ERR, "cannot write PID file '%s'", PID_FILE); |
michael@795 | 56 | + fprintf(fp, "%ld\n", (long)pid); |
michael@795 | 57 | + fclose(fp); |
michael@795 | 58 | + umask(old_umask); |
michael@795 | 59 | + } |
michael@795 | 60 | +#endif |
michael@795 | 61 | } |
michael@795 | 62 | |
michael@795 | 63 | /* Disable path MTU discovery */ |