Skip to contentSkip to conversation

Fix implicit declaration of function 'htons'

PATCH New Wolfgang Denk 1 participant 1 message Apr 4, 2009

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Fix implicit declaration of function 'htons'

Include <netinet/in.h> instead of <linux/in.h> to get htons() prototpye.

---
V2: Make commit message and code agree:
use netinet/in.h instead of arpa/inet.h
as this seems to be more common.

 tools/ncb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
tools/ncb.c +1 -1
index 7e123f1..c240d83 100644
@@ -1,7 +1,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <sys/socket.h>
-#include <linux/in.h>
+#include <netinet/in.h>
 
 int main (int argc, char *argv[])
 {
Signature · 1 line
1.6.0.6