diff options
author | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-26 12:46:08 +0100 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2014-10-26 12:46:08 +0100 |
commit | cc40f381dc3c8a4ad2b3289088f033ad5bfb620e (patch) | |
tree | a080047a36d197124f6f3bbe8a4a35980dc5c66e /testing/dspam/musl-fixes.patch | |
parent | 630a278bc16616e0d8d916b0a5d1d36c50595536 (diff) | |
download | aports-cc40f381dc3c8a4ad2b3289088f033ad5bfb620e.tar.bz2 aports-cc40f381dc3c8a4ad2b3289088f033ad5bfb620e.tar.xz |
testing/dspam: upgrade to 3.10.2 and musl fixes
Diffstat (limited to 'testing/dspam/musl-fixes.patch')
-rw-r--r-- | testing/dspam/musl-fixes.patch | 124 |
1 files changed, 124 insertions, 0 deletions
diff --git a/testing/dspam/musl-fixes.patch b/testing/dspam/musl-fixes.patch new file mode 100644 index 0000000000..23c2adf3b8 --- /dev/null +++ b/testing/dspam/musl-fixes.patch @@ -0,0 +1,124 @@ +--- a/src/libdspam.h.orig ++++ b/src/libdspam.h +@@ -51,10 +51,10 @@ + int libdspam_shutdown(void); + + DSPAM_CTX * dspam_init (const char *username, const char *group, +- const char *home, int operating_mode, u_int32_t flags); ++ const char *home, int operating_mode, uint32_t flags); + + DSPAM_CTX * dspam_create (const char *username, const char *group, +- const char *home, int operating_mode, u_int32_t flags); ++ const char *home, int operating_mode, uint32_t flags); + + int dspam_attach (DSPAM_CTX *CTX, void *dbh); + int dspam_detach (DSPAM_CTX *CTX); +--- a/src/libdspam_objects.h.orig ++++ b/src/libdspam_objects.h +@@ -31,17 +31,17 @@ + #include "config_shared.h" + #include "decode.h" + +-#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(u_int32_t) && !defined(__BIT_TYPES_DEFINED__) ++#if ((defined(__sun__) && defined(__svr4__)) || (defined(__sun) && defined(__SUNPRO_C))) && !defined(uint32_t) && !defined(__BIT_TYPES_DEFINED__) + #define __BIT_TYPES_DEFINED__ + typedef unsigned long long u_int64_t; +-typedef unsigned int u_int32_t; ++typedef unsigned int uint32_t; + typedef unsigned short u_int16_t; + typedef unsigned char u_int8_t; + #endif + + #ifdef _WIN32 +-typedef unsigned int u_int32_t; +-typedef u_int32_t uid_t; ++typedef unsigned int uint32_t; ++typedef uint32_t uid_t; + #endif + + extern void *_drv_handle; /* Handle to storage driver library */ +@@ -312,8 +312,8 @@ + int source; /* DSS_ */ + int learned; /* Did we actually learn something? */ + int tokenizer; /* DSZ_ */ +- u_int32_t flags; +- u_int32_t algorithms; ++ uint32_t flags; ++ uint32_t algorithms; + + int result; + char class[32]; +--- a/src/tokenizer.c.orig ++++ b/src/tokenizer.c +@@ -524,7 +524,7 @@ + const char *heading, const char *bitpattern) + { + int i, t, keylen, breadth; +- u_int32_t mask; ++ uint32_t mask; + unsigned long long crc; + char key[256]; + int active = 0, top, tokenizer = CTX->tokenizer; +@@ -550,7 +550,7 @@ + breadth = _ds_pow2(active); + + /* Iterate and generate all keys necessary */ +- for (mask=0; mask < (u_int32_t)breadth; mask++) { ++ for (mask=0; mask < (uint32_t)breadth; mask++) { + int terms = 0; + + key[0] = 0; +@@ -633,7 +633,7 @@ + unsigned long long crc; + char key[256]; + int active = 0; +- u_int32_t mask; ++ uint32_t mask; + + /* Shift all previous tokens up */ + for(i=0;i<SPARSE_WINDOW_SIZE-1;i++) { +@@ -650,7 +650,7 @@ + + /* Iterate and generate all keys necessary */ + +- for(mask=0;mask < (u_int32_t)breadth;mask++) { ++ for(mask=0;mask < (uint32_t)breadth;mask++) { + int terms = 0; + t = 0; + +@@ -960,13 +960,13 @@ + + char *_ds_generate_bitpattern(int breadth) { + char *bitpattern; +- u_int32_t mask; ++ uint32_t mask; + unsigned long exp; + int i; + + bitpattern = malloc(SPARSE_WINDOW_SIZE * breadth); + +- for(mask=0;mask<(u_int32_t)breadth;mask++) { ++ for(mask=0;mask<(uint32_t)breadth;mask++) { + for(i=0;i<SPARSE_WINDOW_SIZE;i++) { + exp = (i) ? _ds_pow2(i) : 1; + /* Reverse pos = SPARSE_WINDOW_SIZE - (i+1); */ +--- a/src/libdspam.c.orig ++++ b/src/libdspam.c +@@ -122,7 +122,7 @@ + const char *group, + const char *home, + int operating_mode, +- u_int32_t flags) ++ uint32_t flags) + { + DSPAM_CTX *CTX = dspam_create(username, group, home, operating_mode, flags); + +@@ -159,7 +159,7 @@ + const char *group, + const char *home, + int operating_mode, +- u_int32_t flags) ++ uint32_t flags) + { + DSPAM_CTX *CTX; + |