PERFORCE change 165635 for review
Alexander Motin
mav at FreeBSD.org
Sun Jul 5 15:13:49 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=165635
Change 165635 by mav at mav_mavbook on 2009/07/05 15:13:04
Fix user-level build.
Affected files ...
.. //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#12 edit
Differences ...
==== //depot/projects/scottl-camlock/src/sys/cam/ata/ata_all.c#12 (text+ko) ====
@@ -41,6 +41,9 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#ifndef min
+#define min(a,b) (((a)<(b))?(a):(b))
+#endif
#endif
#include <cam/cam.h>
@@ -50,6 +53,7 @@
#include <sys/ata.h>
#include <cam/ata/ata_all.h>
#include <sys/sbuf.h>
+#include <sys/endian.h>
int
ata_version(int ver)
@@ -183,7 +187,7 @@
u_int16_t *ptr = (u_int16_t*)(buf + len);
while (--ptr >= (u_int16_t*)buf)
- *ptr = ntohs(*ptr);
+ *ptr = be16toh(*ptr);
}
void
More information about the p4-projects
mailing list