[klibc] [patch 05/12] make __constant_htons visible

Erik van Konijnenburg ekonijn at xs4all.nl
Sun May 22 07:51:14 PDT 2005


The __constant_htons and similar are defined in klibc version
of netinet/in.h, but not in glibc counterpart.
Include the same thing from <asm/byteorder.h>,
which is available in both glibc and klibc.

Perhaps __constant_htons should be dropped from the
klibc version of netinet/in.h: it provides nothing that
you cannot get via asm/byteorder, and gets in the way of
porting between glibc and klibc.

Signed-off-by: Erik van Konijnenburg <ekonijn at xs4all.nl>

Index: exec/nfsmount/mount.c
===================================================================
--- exec.orig/nfsmount/mount.c	2005-05-21 12:38:16.000000000 +0200
+++ exec/nfsmount/mount.c	2005-05-21 13:30:40.000000000 +0200
@@ -1,5 +1,6 @@
 #include <sys/mount.h>
 #include <sys/types.h>
+#include <asm/byteorder.h>
 #include <sys/socket.h>
 #include <arpa/inet.h>
 #include <netinet/in.h>
Index: exec/nfsmount/portmap.c
===================================================================
--- exec.orig/nfsmount/portmap.c	2003-05-05 08:06:51.000000000 +0200
+++ exec/nfsmount/portmap.c	2005-05-21 13:30:15.000000000 +0200
@@ -1,4 +1,5 @@
 #include <sys/types.h>
+#include <asm/byteorder.h>
 #include <netinet/in.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: exec/ipconfig/packet.c
===================================================================
--- exec.orig/ipconfig/packet.c	2005-05-21 13:32:53.000000000 +0200
+++ exec/ipconfig/packet.c	2005-05-21 13:33:21.000000000 +0200
@@ -4,6 +4,7 @@
  * Packet socket handling glue.
  */
 #include <sys/types.h>
+#include <asm/byteorder.h>
 #include <sys/socket.h>
 #include <stdio.h>
 #include <stdlib.h>
Index: exec/nfsmount/sunrpc.c
===================================================================
--- exec.orig/nfsmount/sunrpc.c	2005-05-21 13:17:24.000000000 +0200
+++ exec/nfsmount/sunrpc.c	2005-05-21 13:34:29.000000000 +0200
@@ -1,5 +1,6 @@
 #define _XOPEN_SOURCE	/* for POLLRDNORM */
 #include <sys/types.h>
+#include <asm/byteorder.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <errno.h>

--



More information about the klibc mailing list