Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1diff --git cdparanoia-III-10.2/interface/utils.h cdparanoia-III-10.2/interface/utils.h 2index c9647da..68c1a3a 100644 3--- cdparanoia-III-10.2/interface/utils.h 4+++ cdparanoia-III-10.2/interface/utils.h 5@@ -1,4 +1,6 @@ 6-#include <endian.h> 7+#include <unistd.h> 8+#include <stdint.h> 9+#include <stdlib.h> 10 #include <stdio.h> 11 #include <errno.h> 12 #include <string.h> 13@@ -14,15 +16,15 @@ static inline int bigendianp(void){ 14 } 15 16 static inline int32_t swap32(int32_t x){ 17- return((((u_int32_t)x & 0x000000ffU) << 24) | 18- (((u_int32_t)x & 0x0000ff00U) << 8) | 19- (((u_int32_t)x & 0x00ff0000U) >> 8) | 20- (((u_int32_t)x & 0xff000000U) >> 24)); 21+ return((((uint32_t)x & 0x000000ffU) << 24) | 22+ (((uint32_t)x & 0x0000ff00U) << 8) | 23+ (((uint32_t)x & 0x00ff0000U) >> 8) | 24+ (((uint32_t)x & 0xff000000U) >> 24)); 25 } 26 27 static inline int16_t swap16(int16_t x){ 28- return((((u_int16_t)x & 0x00ffU) << 8) | 29- (((u_int16_t)x & 0xff00U) >> 8)); 30+ return((((uint16_t)x & 0x00ffU) << 8) | 31+ (((uint16_t)x & 0xff00U) >> 8)); 32 } 33 34 #if BYTE_ORDER == LITTLE_ENDIAN 35diff --git cdparanoia-III-10.2/utils.h cdparanoia-III-10.2/utils.h 36index 10dce58..6211ce3 100644 37--- cdparanoia-III-10.2/utils.h 38+++ cdparanoia-III-10.2/utils.h 39@@ -1,5 +1,6 @@ 40+#include <unistd.h> 41+#include <stdint.h> 42 #include <stdlib.h> 43-#include <endian.h> 44 #include <stdio.h> 45 #include <errno.h> 46 #include <string.h> 47@@ -18,15 +19,15 @@ static inline int bigendianp(void){ 48 } 49 50 static inline int32_t swap32(int32_t x){ 51- return((((u_int32_t)x & 0x000000ffU) << 24) | 52- (((u_int32_t)x & 0x0000ff00U) << 8) | 53- (((u_int32_t)x & 0x00ff0000U) >> 8) | 54- (((u_int32_t)x & 0xff000000U) >> 24)); 55+ return((((uint32_t)x & 0x000000ffU) << 24) | 56+ (((uint32_t)x & 0x0000ff00U) << 8) | 57+ (((uint32_t)x & 0x00ff0000U) >> 8) | 58+ (((uint32_t)x & 0xff000000U) >> 24)); 59 } 60 61 static inline int16_t swap16(int16_t x){ 62- return((((u_int16_t)x & 0x00ffU) << 8) | 63- (((u_int16_t)x & 0xff00U) >> 8)); 64+ return((((uint16_t)x & 0x00ffU) << 8) | 65+ (((uint16_t)x & 0xff00U) >> 8)); 66 } 67 68 #if BYTE_ORDER == LITTLE_ENDIAN