Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | caddr_t is a legacy BSD type which was rejected by the POSIX standard. |
| 2 | Use void * instead. |
| 3 | |
| 4 | sys/unitstd.h is not needed and moreover its not available on all C library |
| 5 | implementations e.g. musl |
| 6 | |
| 7 | Upstream-Status: Pending |
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 9 | Index: chkconfig-1.3.58/alternatives.c |
| 10 | =================================================================== |
| 11 | --- chkconfig-1.3.58.orig/alternatives.c |
| 12 | +++ chkconfig-1.3.58/alternatives.c |
| 13 | @@ -22,7 +22,6 @@ |
| 14 | #include <stdio.h> |
| 15 | #include <string.h> |
| 16 | #include <sys/stat.h> |
| 17 | -#include <sys/unistd.h> |
| 18 | #include <unistd.h> |
| 19 | |
| 20 | #define FLAGS_TEST (1 << 0) |
| 21 | Index: chkconfig-1.3.58/leveldb.c |
| 22 | =================================================================== |
| 23 | --- chkconfig-1.3.58.orig/leveldb.c |
| 24 | +++ chkconfig-1.3.58/leveldb.c |
| 25 | @@ -442,7 +442,7 @@ int parseServiceInfo(int fd, char * name |
| 26 | fstat(fd, &sb); |
| 27 | |
| 28 | bufstart = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); |
| 29 | - if (bufstart == ((caddr_t) -1)) { |
| 30 | + if (bufstart == ((void*) -1)) { |
| 31 | close(fd); |
| 32 | return -1; |
| 33 | } |