The attached patch should fix the issue.

Attachment: 0001-darwin-define-_DARWIN_C_SOURCE-to-avoid-undefined-ty.patch
Description: Binary data


-Nathan

On Apr 6, 2014, at 9:17 PM, Nathan Hjelm <[email protected]> wrote:


On Apr 6, 2014, at 5:39 PM, Grayson Manley <[email protected]> wrote:

Apologies if I'm making any mailing list faux pas.

The master version of libbluray has been failing to compile on my machine: OS X 10.9.2-x86_64.
The current stable version successfully compiles.

Here is what appears to be the relevant part of the make output:

libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -std=c99 -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT -I.. -Ifile -Ilibbluray -Ilibbluray/bdnav -I/usr/include/libxml2 -I/usr/local/Cellar/freetype/2.5.3_1/include/freetype2 -g -O2 -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wcast-qual -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wshadow -Werror=implicit-function-declaration -Wextra -Winline -O3 -fomit-frame-pointer -c libbluray/register.c  -fno-common -DPIC -o libbluray/.libs/register.o
In file included from libbluray/bluray.c:65:
/usr/include/sys/ucred.h:91:2: error: unknown type name 'u_long'; did you mean 'long'?
        u_long  cr_ref;                 /* reference count */
        ^
/usr/include/sys/ucred.h:133:9: error: unknown type name 'u_int'
        u_int   cr_version;             /* structure layout version */
        ^
In file included from libbluray/bluray.c:66:
In file included from /usr/include/sys/mount.h:76:
/usr/include/sys/attr.h:78:2: error: unknown type name 'u_short'; did you mean 'short'?
        u_short bitmapcount;                    /* number of attr. bit sets in list (should be 5) */
        ^
/usr/include/sys/attr.h:442:2: error: unknown type name 'u_long'; did you mean 'long'?
        u_long                          maxmatches;
        ^
/usr/include/sys/attr.h:455:2: error: unknown type name 'u_char'; did you mean 'char'?
        u_char                          ss_fsstate[548];        // fs private
        ^


I also attached a full log file if needed.


After adding '-D_DARWIN_C_SOURCE' to CFLAGS I was able to successfully compile master.


I have limited knowledge of the subject but, if it is at all helpful, here is some info I found.

It appears that a relevant part of the makefile may may be 'src/Makefile.am:1' and '-D_POSIX_C_SOURCE=200112L'.

Here are some resources I found by googling:


Let me know if any other info would be helpful.

Looking at /usr/include/sys/types.h it looks like the correct fix is to add the -D_DARWIN_C_SOURCE to the Makefile.am on OSX. Let me see if I can put together a patch.

-Nathan

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
libbluray-devel mailing list
[email protected]
https://mailman.videolan.org/listinfo/libbluray-devel

Reply via email to