[PATCH] libdvbv5: Fix byte swapping for embedded toolchains

2012-08-21 Thread Gregor Jasny
Reported-by: Lad, Prabhakar prabhakar@ti.com
Signed-off-by: Gregor Jasny gja...@googlemail.com
---
 lib/include/descriptors.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/include/descriptors.h b/lib/include/descriptors.h
index 9039014..a64370c 100644
--- a/lib/include/descriptors.h
+++ b/lib/include/descriptors.h
@@ -25,7 +25,7 @@
 #ifndef _DESCRIPTORS_H
 #define _DESCRIPTORS_H
 
-#include endian.h
+#include arpa/inet.h
 #include unistd.h
 #include stdint.h
 
@@ -46,11 +46,11 @@ extern char *default_charset;
 extern char *output_charset;
 
 #define bswap16(b) do {\
-   b = be16toh(b); \
+   b = ntohs(b); \
 } while (0)
 
 #define bswap32(b) do {\
-   b = be32toh(b); \
+   b = ntohl(b); \
 } while (0)
 
 struct dvb_desc {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] libdvbv5: Fix byte swapping for embedded toolchains

2012-08-21 Thread Prabhakar Lad
Hi Gregor,

Thanks for the patch.

On Wednesday 22 August 2012 12:28 AM, Gregor Jasny wrote:
 Reported-by: Lad, Prabhakar prabhakar@ti.com
 Signed-off-by: Gregor Jasny gja...@googlemail.com

  Acked-by: Prabhakar Lad prabhakar@ti.com

Thx,
--Prabhakar

 ---
  lib/include/descriptors.h |6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
 diff --git a/lib/include/descriptors.h b/lib/include/descriptors.h
 index 9039014..a64370c 100644
 --- a/lib/include/descriptors.h
 +++ b/lib/include/descriptors.h
 @@ -25,7 +25,7 @@
  #ifndef _DESCRIPTORS_H
  #define _DESCRIPTORS_H
  
 -#include endian.h
 +#include arpa/inet.h
  #include unistd.h
  #include stdint.h
  
 @@ -46,11 +46,11 @@ extern char *default_charset;
  extern char *output_charset;
  
  #define bswap16(b) do {\
 - b = be16toh(b); \
 + b = ntohs(b); \
  } while (0)
  
  #define bswap32(b) do {\
 - b = be32toh(b); \
 + b = ntohl(b); \
  } while (0)
  
  struct dvb_desc {
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html