This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
FreeBSD port (9): missing include in htontest.c
- From: Bruno Haible <bruno at clisp dot org>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 9 Jul 2002 15:45:45 +0200 (CEST)
- Subject: FreeBSD port (9): missing include in htontest.c
Hi,
inet/htontest.c uses the u_int32_t and u_int16_t types, but does not include
an appropriate header file. (According to SUSV3, neither <stdio.h> nor
<netinet/in.h> are required to define them.) On BSD systems they are found
in <sys/types.h>. On FreeBSD I get a compilation error:
htontest.c:41: parse error before "lo"
2002-07-06 Bruno Haible <bruno@clisp.org>
* inet/htontest.c: Include <sys/types.h>.
diff -r -c3 glibc-20020627.bak/inet/htontest.c glibc-20020627/inet/htontest.c
--- glibc-20020627.bak/inet/htontest.c Tue Jul 10 22:58:50 2001
+++ glibc-20020627/inet/htontest.c Fri Jul 5 01:17:05 2002
@@ -1,5 +1,5 @@
/* Test hton/ntoh functions.
- Copyright (C) 1997 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -20,6 +20,7 @@
#include <endian.h>
#include <stdio.h>
+#include <sys/types.h>
#include <netinet/in.h>
#if BYTE_ORDER == BIG_ENDIAN