[haiku-development] Cross-building the locale kit : problem with some headers

  • From: PulkoMandy <pulkomandy@xxxxxxxxx>
  • To: Haiku dev <haiku-development@xxxxxxxxxxxxx>
  • Date: Sat, 11 Apr 2009 20:30:31 +0200

I'm tryingto get the locale kit working under linux so I can use it
for translating Haiku.
I've encountered a little problem with addr_t in
headers/posix/sys/types.h . This is replaced by haiku_build_addr_t in
BeOSBuildCompatibility.h, and the typedef raises an error. I've done
the following (see attached patch) to get it working. Is is the
correct fix ? or is there a better solution ?

-- 
Adrien - GCoC candidate
Index: types.h
===================================================================
--- types.h     (révision 30120)
+++ types.h     (copie de travail)
@@ -45,7 +45,10 @@
 typedef int                    daddr_t;
 typedef char *                         caddr_t;
 
-typedef unsigned long          addr_t;
+#ifndef addr_t
+       typedef unsigned long   addr_t;
+#endif
+
 typedef long                           key_t;
 
 #include <null.h>

Other related posts: