]> git.pld-linux.org Git - packages/atftp.git/commitdiff
- new
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 12 Jan 2007 16:32:44 +0000 (16:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    atftp-clk.patch -> 1.1
    atftp-debian.patch -> 1.1
    atftp-tinfo.patch -> 1.1

atftp-clk.patch [new file with mode: 0644]
atftp-debian.patch [new file with mode: 0644]
atftp-tinfo.patch [new file with mode: 0644]

diff --git a/atftp-clk.patch b/atftp-clk.patch
new file mode 100644 (file)
index 0000000..e66eac0
--- /dev/null
@@ -0,0 +1,11 @@
+diff -urN atftp-0.7.org/stats.c atftp-0.7/stats.c
+--- atftp-0.7.org/stats.c      2002-03-27 04:02:12.000000000 +0100
++++ atftp-0.7/stats.c  2007-01-12 17:31:55.432390250 +0100
+@@ -14,6 +14,7 @@
+  * option) any later version.
+  */
++#define _POSIX_SOURCE 1
+ #include "config.h"
+ #include <limits.h>
diff --git a/atftp-debian.patch b/atftp-debian.patch
new file mode 100644 (file)
index 0000000..0a7e2e8
--- /dev/null
@@ -0,0 +1,133 @@
+--- atftp-0.7.dfsg.orig/tftpd.c
++++ atftp-0.7.dfsg/tftpd.c
+@@ -157,6 +157,7 @@
+      struct servent *serv;
+      struct passwd *user;
+      struct group *group;
++     pthread_t tid;
+ #ifdef HAVE_MTFTP
+      pthread_t mtftp_thread;
+@@ -300,11 +301,13 @@
+           open_logger("atftpd", log_file, logging_level);
+      }
++#ifdef SOL_IP
+      /* We need to retieve some information from incomming packets */
+      if (setsockopt(0, SOL_IP, IP_PKTINFO, &one, sizeof(one)) != 0)
+      {
+           logger(LOG_WARNING, "Failed to set socket option: %s", strerror(errno));
+      }
++#endif
+      /* save main thread ID for proper signal handling */
+      main_thread_id = pthread_self();
+@@ -466,7 +469,7 @@
+                new->client_info->next = NULL;
+                
+                /* Start a new server thread. */
+-               if (pthread_create(&new->tid, NULL, tftpd_receive_request,
++               if (pthread_create(&tid, NULL, tftpd_receive_request,
+                                   (void *)new) != 0)
+                {
+                     logger(LOG_ERR, "Failed to start new thread");
+@@ -567,7 +570,8 @@
+      /* Detach ourself. That way the main thread does not have to
+       * wait for us with pthread_join. */
+-     pthread_detach(pthread_self());
++     data->tid = pthread_self();
++     pthread_detach(data->tid);
+      /* Read the first packet from stdin. */
+      data_size = data->data_buffer_size;     
+@@ -732,8 +736,8 @@
+      tftpd_clientlist_free(data);
+      /* free the thread structure */
+-     free(data);
+-     
++     free(data);    
++
+      logger(LOG_INFO, "Server thread exiting");
+      pthread_exit(NULL);
+ }
+--- atftp-0.7.dfsg.orig/argz.h
++++ atftp-0.7.dfsg/argz.h
+@@ -180,7 +180,7 @@
+ #ifdef __USE_EXTERN_INLINES
+ extern inline char *
+ __argz_next (__const char *__argz, size_t __argz_len,
+-           __const char *__entry) __THROW
++           __const char *__entry)
+ {
+   if (__entry)
+     {
+@@ -194,7 +194,7 @@
+ }
+ extern inline char *
+ argz_next (__const char *__argz, size_t __argz_len,
+-         __const char *__entry) __THROW
++         __const char *__entry)
+ {
+   return __argz_next (__argz, __argz_len, __entry);
+ }
+--- atftp-0.7.dfsg.orig/Makefile.am
++++ atftp-0.7.dfsg/Makefile.am
+@@ -32,7 +32,7 @@
+                  argz.c tftp_mtftp.c
+ sbin_PROGRAMS    = atftpd
+-atftpd_LDADD     = $(LIBPTHREAD) $(LIBWRAP) $(LIBPCRE)
++atftpd_LDADD     = $(LIBWRAP) $(LIBPTHREAD) $(LIBPCRE)
+ atftpd_SOURCES   = tftpd.c logger.c options.c stats.c tftp_io.c tftp_def.c \
+                    tftpd_file.c tftpd_list.c tftpd_mcast.c argz.c tftpd_pcre.c \
+                  tftpd_mtftp.c
+--- atftp-0.7.dfsg.orig/tftp_io.c
++++ atftp-0.7.dfsg/tftp_io.c
+@@ -284,12 +284,14 @@
+                     cmsg != NULL && cmsg->cmsg_len >= sizeof(*cmsg);
+                     cmsg = CMSG_NXTHDR(&msg, cmsg))
+                {
++#ifdef SOL_IP
+                     if (cmsg->cmsg_level == SOL_IP
+                         && cmsg->cmsg_type == IP_PKTINFO)
+                     {
+                          pktinfo = (struct in_pktinfo *)CMSG_DATA(cmsg);
+                          sa_to->sin_addr = pktinfo->ipi_addr;
+                     }
++#endif                    
+                     break;
+                }
+           }
+--- atftp-0.7.dfsg.orig/tftp.c
++++ atftp-0.7.dfsg/tftp.c
+@@ -354,7 +354,7 @@
+ void make_arg(char *string, int *argc, char ***argv)
+ {
+      static char *tmp = NULL;
+-     int argz_len;
++     size_t argz_len;
+      /* split the string to an argz vector */
+      if (argz_create_sep(string, ' ', &tmp, &argz_len) != 0)
+@@ -731,7 +731,7 @@
+      fsync(data.sockfd);
+      close(data.sockfd);
+-     return OK;
++     return tftp_result;
+ }
+ #ifdef HAVE_MTFTP
+--- atftp-0.7.dfsg.orig/tftp_file.c
++++ atftp-0.7.dfsg/tftp_file.c
+@@ -59,7 +59,7 @@
+      unsigned int next_word;
+      /* initial stuff */
+-     next_hole = prev_hole + 1;
++     next_hole = 0; /*prev_hole + 1;*/
+      next_word_no = next_hole / 32;
+      next_bit_no  = next_hole % 32;
+      next_word = bitmap[next_word_no];
diff --git a/atftp-tinfo.patch b/atftp-tinfo.patch
new file mode 100644 (file)
index 0000000..69b817a
--- /dev/null
@@ -0,0 +1,18 @@
+diff -urN atftp-0.7.org/configure.ac atftp-0.7/configure.ac
+--- atftp-0.7.org/configure.ac 2004-03-16 02:51:40.000000000 +0100
++++ atftp-0.7/configure.ac     2007-01-12 17:28:51.708908250 +0100
+@@ -107,11 +107,12 @@
+ if test x$libreadline = xtrue; then
+    dnl Debian's readline is already linked to ncurses. It is not the case for
+    dnl all other systems.
+-   AC_CHECK_LIB(readline, tgetent, LIBTERMCAP="",
++   AC_CHECK_LIB(tinfo, tgetent, LIBTERMCAP=-ltinfo,
++     AC_CHECK_LIB(readline, tgetent, LIBTERMCAP="",
+       AC_CHECK_LIB(ncurses, tgetent, LIBTERMCAP=-lncurses,
+               AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses,
+                       AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap,
+-                      AC_MSG_RESULT(no)))))
++                      AC_MSG_RESULT(no))))))
+    AC_SUBST(LIBTERMCAP)
+    dnl Check for readline
This page took 0.085315 seconds and 4 git commands to generate.