Skip to content

Commit 66fc4e8

Browse files
committed
Fixed duplicate case value when compiling libxml2 on AIX
This is the error we got: ``` 00:01:07 xmlIO.c: In function 'xmlIOErr': 00:01:07 xmlIO.c:502:9: error: duplicate case value 00:01:07 case ENOTEMPTY: code = XML_IO_ENOTEMPTY; break; 00:01:07 ^~~~ 00:01:07 xmlIO.c:439:9: error: previously used here 00:01:07 case EEXIST: code = XML_IO_EEXIST; break; 00:01:07 ^~~~ ``` It appears that the `ENOTEMPTY` & `EEXITS` are defined as the same value. Defining `_LINUX_SOURCE_COMPAT` should give them unique values. ```C /* * AIX returns EEXIST where 4.3BSD used ENOTEMPTY; * but, the standards insist on unique errno values for each errno. * A unique value is reserved for users that want to code case * statements for systems that return either EEXIST or ENOTEMPTY. */ ``` Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech> (cherry picked from commit 794e1fd)
1 parent 048845a commit 66fc4e8

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

deps-packaging/libxml2/cfbuild-libxml2.spec

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ then
3030
chmod a+x configure
3131
fi
3232
./configure --prefix=%{prefix} --without-python --enable-shared --disable-static --with-zlib=%{prefix} \
33-
CPPFLAGS="-I%{prefix}/include" \
33+
CPPFLAGS="-I%{prefix}/include -D_LINUX_SOURCE_COMPAT" \
3434
LD_LIBRARY_PATH="%{prefix}/lib" LD_RUN_PATH="%{prefix}/lib"
3535

3636
%build
@@ -83,5 +83,3 @@ CFEngine Build Automation -- libxml2 -- development files
8383
%prefix/lib/pkgconfig
8484

8585
%changelog
86-
87-

0 commit comments

Comments
 (0)