Make this compile and not segfault on ia64. ptr = strdup("foo"); is

fatal if the declaration of strdup() isn't in scope.  The upper 32 bits
of the pointer are lost since it defaults to returning "int".  Fix some
warnings while here, including trying to make gcc-3.1 happy.
This commit is contained in:
Peter Wemm
2002-05-01 06:49:43 +00:00
parent 29ea697d8a
commit 37436e4075
2 changed files with 8 additions and 6 deletions
+4 -3
View File
@@ -38,7 +38,7 @@
static const char copyright[] =
"@(#) Copyright (c) 1989, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif not lint
#endif /* not lint */
#ifndef lint
#if 0
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif not lint
#endif /* not lint */
#include <sys/param.h>
#include <sys/syslog.h>
@@ -69,7 +69,7 @@ static const char rcsid[] =
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
@@ -741,6 +741,7 @@ setbindhost(struct addrinfo **ai, const char *bindhost, struct addrinfo hints)
}
break;
default:
break;
}
}
+4 -3
View File
@@ -38,7 +38,7 @@
static const char copyright[] =
"@(#) Copyright (c) 1989, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
#endif not lint
#endif /* not lint */
#ifndef lint
#if 0
@@ -46,7 +46,7 @@ static char sccsid[] = "@(#)nfsd.c 8.9 (Berkeley) 3/29/95";
#endif
static const char rcsid[] =
"$FreeBSD$";
#endif not lint
#endif /* not lint */
#include <sys/param.h>
#include <sys/syslog.h>
@@ -69,7 +69,7 @@ static const char rcsid[] =
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <strings.h>
#include <string.h>
#include <unistd.h>
#include <netdb.h>
@@ -741,6 +741,7 @@ setbindhost(struct addrinfo **ai, const char *bindhost, struct addrinfo hints)
}
break;
default:
break;
}
}