Commit f28fe793b79669323081bfc9298173a1d57a152f

Thomas de Grivel 2018-06-17T16:38:35

htons

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
diff --git a/cffi-socket.lisp b/cffi-socket.lisp
index 108b432..a3edfbd 100644
--- a/cffi-socket.lisp
+++ b/cffi-socket.lisp
@@ -63,9 +63,12 @@
       (error-errno "bind"))
     r))
 
-(defcfun "htons" uint16-t
+(defcfun ("htons" c-htons) uint16-t
   (hostshort uint16-t))
 
+(defun htons (hostshort)
+  (c-htons hostshort))
+
 ;;  IP
 
 (defun inet-addr-from-string (x &key (start 0) (end (length x)))