From: Benno <benjl@cse.unsw.edu.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] Use posix headers in sumversion.c
Date: Tue, 10 Aug 2004 23:41:02 +1000 [thread overview]
Message-ID: <20040810134102.GA15576@cse.unsw.edu.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
When compiling Linux on Mac OSX I had trouble with scripts/sumversion.c.
It includes <netinet/in.h> to obtain to definitions of htonl and ntohl.
On Mac OSX these are found in <arpa/inet.h>. After checking the POSIX
specification it appears that this is the correct place to get
the definitons for these functions.
(http://www.opengroup.org/onlinepubs/009695399/functions/htonl.html)
Using this header also appears to work on Linux (at least with
Glibc-2.3.2).
It seems clearer to me to go with the POSIX standard than implementing
#if __APPLE__ style macros, but if such an approach is preferred I can
supply patches for that instead.
A patch against 2.6.7 which change <netinet/in.h> -> <arpa/inet.h> is
attached.
Cheers,
Benno
[-- Attachment #2: sumversion.patch --]
[-- Type: text/plain, Size: 237 bytes --]
--- sumversion.c 2004-08-10 23:26:27.000000000 +1000
+++ sumversion.c.orig 2004-08-10 23:26:08.000000000 +1000
@@ -1,4 +1,4 @@
-#include <arpa/inet.h>
+#include <netinet/in.h>
#include <stdint.h>
#include <ctype.h>
#include <errno.h>
next reply other threads:[~2004-08-10 13:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-10 13:41 Benno [this message]
2004-08-10 20:12 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040810134102.GA15576@cse.unsw.edu.au \
--to=benjl@cse.unsw.edu.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®