1Upstream-Status: Inappropriate [fix poky patch] 2 3This patch fixes build issues with a previous endian-ness_handling.patch on 4distros that don't have macros referenced 5 67/20/2011 7Matthew McClintock <msm@freescale.com> 8 9diff -purN ldconfig-native-2.12.1.orig/endian_extra.h ldconfig-native-2.12.1/endian_extra.h 10--- ldconfig-native-2.12.1.orig/endian_extra.h 1969-12-31 18:00:00.000000000 -0600 11+++ ldconfig-native-2.12.1/endian_extra.h 2011-07-19 18:09:14.323048417 -0500 12@@ -0,0 +1,64 @@ 13+/* Copyright (C) 1992, 1996, 1997, 2000, 2008 Free Software Foundation, Inc. 14+ This file is part of the GNU C Library. 15+ 16+ The GNU C Library is free software; you can redistribute it and/or 17+ modify it under the terms of the GNU Lesser General Public 18+ License as published by the Free Software Foundation; either 19+ version 2.1 of the License, or (at your option) any later version. 20+ 21+ The GNU C Library is distributed in the hope that it will be useful, 22+ but WITHOUT ANY WARRANTY; without even the implied warranty of 23+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 24+ Lesser General Public License for more details. 25+ 26+ You should have received a copy of the GNU Lesser General Public 27+ License along with the GNU C Library; if not, write to the Free 28+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 29+ 02111-1307 USA. */ 30+ 31+#include <endian.h> 32+ 33+#ifndef _ENDIAN_EXTRA_H 34+#define _ENDIAN_EXTRA_H 1 35+ 36+/* Don't redefine these macros if they already exist */ 37+#ifndef htobe16 38+#ifdef __USE_BSD 39+/* Conversion interfaces. */ 40+# include <byteswap.h> 41+ 42+# if __BYTE_ORDER == __LITTLE_ENDIAN 43+# define htobe16(x) __bswap_16 (x) 44+# define htole16(x) (x) 45+# define be16toh(x) __bswap_16 (x) 46+# define le16toh(x) (x) 47+ 48+# define htobe32(x) __bswap_32 (x) 49+# define htole32(x) (x) 50+# define be32toh(x) __bswap_32 (x) 51+# define le32toh(x) (x) 52+ 53+# define htobe64(x) __bswap_64 (x) 54+# define htole64(x) (x) 55+# define be64toh(x) __bswap_64 (x) 56+# define le64toh(x) (x) 57+# else 58+# define htobe16(x) (x) 59+# define htole16(x) __bswap_16 (x) 60+# define be16toh(x) (x) 61+# define le16toh(x) __bswap_16 (x) 62+ 63+# define htobe32(x) (x) 64+# define htole32(x) __bswap_32 (x) 65+# define be32toh(x) (x) 66+# define le32toh(x) __bswap_32 (x) 67+ 68+# define htobe64(x) (x) 69+# define htole64(x) __bswap_64 (x) 70+# define be64toh(x) (x) 71+# define le64toh(x) __bswap_64 (x) 72+# endif 73+#endif 74+#endif 75+ 76+#endif /* endian_extra.h */ 77diff -purN ldconfig-native-2.12.1.orig/cache.c ldconfig-native-2.12.1/cache.c 78--- ldconfig-native-2.12.1.orig/cache.c 2011-07-19 18:21:28.347041301 -0500 79+++ ldconfig-native-2.12.1/cache.c 2011-07-19 18:22:54.118048064 -0500 80@@ -39,6 +39,8 @@ 81 # define N_(msgid) msgid 82 #define _(msg) msg 83 84+#include "endian_extra.h" 85+ 86 extern int be; 87 88 static uint16_t write16(uint16_t x, int be) 89diff -purN ldconfig-native-2.12.1.orig/readelflib.c ldconfig-native-2.12.1/readelflib.c 90--- ldconfig-native-2.12.1.orig/readelflib.c 2011-07-19 18:21:28.346041593 -0500 91+++ ldconfig-native-2.12.1/readelflib.c 2011-07-19 18:23:05.324059875 -0500 92@@ -25,6 +25,9 @@ 93 94 /* check_ptr checks that a pointer is in the mmaped file and doesn't 95 point outside it. */ 96+ 97+#include "endian_extra.h" 98+ 99 #undef check_ptr 100 #define check_ptr(ptr) \ 101 do \ 102diff -purN ldconfig-native-2.12.1.orig/readlib.c ldconfig-native-2.12.1/readlib.c 103--- ldconfig-native-2.12.1.orig/readlib.c 2011-07-19 18:21:28.346041593 -0500 104+++ ldconfig-native-2.12.1/readlib.c 2011-07-19 18:23:23.877046210 -0500 105@@ -40,6 +40,8 @@ 106 107 #include "ldconfig.h" 108 109+#include "endian_extra.h" 110+ 111 #define _(msg) msg 112 113 #define Elf32_CLASS ELFCLASS32 114