aboutsummaryrefslogtreecommitdiffstats
path: root/skeletons
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2013-03-16 07:57:14 -0700
committerLev Walkin <vlm@lionet.info>2013-03-16 07:57:14 -0700
commit8e66643dc36f60598dcad48ca6d427f20c063628 (patch)
tree616c3c8e1a7458577fc1d58c1cef7715e5137b48 /skeletons
parent0afe0735d483eb8f479d87de33b465d6a0df6ea0 (diff)
parent762747cfb0468e76378aaeacc62e1f5cecdecad3 (diff)
Merge pull request #23 from basinilya/upstream
Fix sys_ntohl macro; it just replicated the low byte instead of reordering bytes
Diffstat (limited to 'skeletons')
-rw-r--r--skeletons/asn_system.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/skeletons/asn_system.h b/skeletons/asn_system.h
index a992230b..e420ad2d 100644
--- a/skeletons/asn_system.h
+++ b/skeletons/asn_system.h
@@ -29,9 +29,9 @@
/* To avoid linking with ws2_32.lib, here's the definition of ntohl() */
#define sys_ntohl(l) ((((l) << 24) & 0xff000000) \
- | (((l) << 16) & 0xff0000) \
- | (((l) << 8) & 0xff00) \
- | ((l) & 0xff))
+ | (((l) << 8) & 0xff0000) \
+ | (((l) >> 8) & 0xff00) \
+ | ((l >> 24) & 0xff))
#ifdef _MSC_VER /* MSVS.Net */
#ifndef __cplusplus