diff mbox

libdvbv5: Fix byte swapping for embedded toolchains

Message ID 1345575502-3779-2-git-send-email-gjasny@googlemail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gregor Jasny Aug. 21, 2012, 6:58 p.m. UTC
Reported-by: "Lad, Prabhakar" <prabhakar.lad@ti.com>
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
---
 lib/include/descriptors.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Prabhakar Lad Aug. 22, 2012, 4:51 a.m. UTC | #1
Hi Gregor,

Thanks for the patch.

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

  Acked-by: Prabhakar Lad <prabhakar.lad@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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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 {