Commit 66fc4e8
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
0 commit comments