Unbreak buildworld.
[dragonfly.git] / contrib / smbfs / lib / smb / rap.c
index eb4671c..4529d26 100644 (file)
@@ -45,7 +45,7 @@
 #include <stdlib.h>
 #include <sysexits.h>
 
-#include <sys/mchain.h>
+#include <sys/endian.h>
 
 #include <netsmb/smb_lib.h>
 #include <netsmb/smb_conn.h>
@@ -290,7 +290,7 @@ smb_rap_getNparam(struct smb_rap *rap, long *value)
                return error;
        switch (ptype) {
            case 'h':
-               *value = letohs(*(u_int16_t*)rap->r_npbuf);
+               *value = le16toh(*(u_int16_t*)rap->r_npbuf);
                break;
            default:
                return EINVAL;
@@ -320,8 +320,8 @@ smb_rap_request(struct smb_rap *rap, struct smb_ctx *ctx)
        if (error)
                return error;
        rp = (u_int16_t*)rap->r_pbuf;
-       rap->r_result = letohs(*rp++);
-       conv = letohs(*rp++);
+       rap->r_result = le16toh(*rp++);
+       conv = le16toh(*rp++);
        rap->r_npbuf = (char*)rp;
        rap->r_entries = entries = 0;
        done = 0;
@@ -329,7 +329,7 @@ smb_rap_request(struct smb_rap *rap, struct smb_ctx *ctx)
                ptype = *p;
                switch (ptype) {
                    case 'e':
-                       rap->r_entries = entries = letohs(*(u_int16_t*)rap->r_npbuf);
+                       rap->r_entries = entries = le16toh(*(u_int16_t*)rap->r_npbuf);
                        rap->r_npbuf += 2;
                        p++;
                        break;