1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
Author: Andreas Beckmann <anbe@debian.org>
Description: fix building with -Werror=implicit-function-declaration
--- a/dcc/dcc.c
+++ b/dcc/dcc.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
@@ -31,8 +32,9 @@
#include <signal.h>
#include <fcntl.h>
#include <netinet/in.h>
-#define _GNU_SOURCE
#include <getopt.h>
+#include <unistd.h>
+#include <arpa/inet.h>
#ifndef MAXHOSTNAMELEN
# define MAXHOSTNAMELEN 31
--- a/dcc/tcp.c
+++ b/dcc/tcp.c
@@ -21,6 +21,7 @@
/* This program is based on `tcp' comming from old GNUS distribution
written by Masanobu Umeda <umerin@mse.kyutech.ac.jp>. */
+#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/time.h>
#include <sys/socket.h>
@@ -33,8 +34,8 @@
#include <signal.h>
#include <fcntl.h>
#include <netinet/in.h>
-#define _GNU_SOURCE
#include <getopt.h>
+#include <stdlib.h>
#ifdef HAVE_BASENAME
# ifdef HAVE_LIBGEN_H
@@ -67,6 +68,7 @@ void usage() {
}
+int
main (argc, argv)
int argc;
char *argv[];
|