Bug 8433 - error: sys/endian.h: No such file or directory
Summary: error: sys/endian.h: No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 7.1 (2006.05)
Hardware: PowerPC Mac OS X (All)
: high normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-27 03:59 UTC by Peter Dyballa
Modified: 2007-03-10 02:54 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Peter Dyballa 2006-09-27 03:59:55 UTC
On Mac OS X 10.4 (Tiger) at least (the Mac OS X SDKs for Mac OS X 10.2.8 and 10.3.9 have the same set 
of header files, minus the new /usr/include/i386/endian.h) it seems to be necessary to include 
machine/endian.h instead of sys/endian.h, which does not exist. My simple patch to achieve this is:

*** X11R7.1/xserver/GL/glx/indirect_dispatch_swap.c.orig	2006-09-25 19:23:56.000000000 
+0200
--- X11R7.1/xserver/GL/glx/indirect_dispatch_swap.c	2006-09-27 12:06:41.000000000 +0200
***************
*** 36,42 ****
--- 36,46 ----
  #define bswap_32 __swap32
  #define bswap_64 __swap64
  #else
+ #ifdef __APPLE__
+ #include <machine/endian.h>
+ #else
  #include <sys/endian.h>
+ #endif
  #define bswap_16 bswap16
  #define bswap_32 bswap32
  #define bswap_64 bswap64

Five files need this patch to compile:

xserver/GL/glx/indirect_dispatch_swap.c
xserver/GL/glx/indirect_program.c
xserver/GL/glx/indirect_texture_compression
xserver/GL/glx/indirect_util.c
xserver/GL/glx/swap_interval.c
Comment 1 Daniel Stone 2007-02-27 01:33:44 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 2 George - 2007-03-10 02:54:58 UTC
Should be fixed in HEAD. Reopen if it persists.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.