Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jul 2009 15:13:48 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 165635 for review
Message-ID:  <200907051513.n65FDmXI078301@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=165635

Change 165635 by mav@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907051513.n65FDmXI078301>