diff options
author | Jason E. Hale <jhale@FreeBSD.org> | 2023-12-28 16:29:57 -0500 |
---|---|---|
committer | Jason E. Hale <jhale@FreeBSD.org> | 2023-12-28 18:03:34 -0500 |
commit | 0843a53a966e654d77e3d190c695d6e33bd549b5 (patch) | |
tree | 9d94a50249dc3cb5626329e330f7bf3c66aa3177 /biology | |
parent | comms/uhd: Remove PORTDOCS macro (diff) |
biology/libbigwig: Fix name-clashing in roundup
Rename the roundup method defined in bwValues.c as it clashes with the
roundup macro defined in sys/param.h
/wrkdirs/usr/ports/biology/libbigwig/work/libBigWig-0.4.7/bwValues.c:9:35:
error: too few arguments provided to function-like macro invocation
static uint32_t roundup(uint32_t v) {
^
/usr/include/sys/param.h:300:9: note: macro 'roundup' defined here
^
/wrkdirs/usr/ports/biology/libbigwig/work/libBigWig-0.4.7/bwValues.c:9:24:
error: expected ';' after top level declarator
static uint32_t roundup(uint32_t v) {
^
;
/wrkdirs/usr/ports/biology/libbigwig/work/libBigWig-0.4.7/bwValues.c:350:30:
error: too few arguments provided to function-like macro invocation
o->m = roundup(o->l+1);
^
/usr/include/sys/param.h:300:9: note: macro 'roundup' defined here
^
/wrkdirs/usr/ports/biology/libbigwig/work/libBigWig-0.4.7/bwValues.c:370:30:
error: too few arguments provided to function-like macro invocation
o->m = roundup(o->l+1);
^
/usr/include/sys/param.h:300:9: note: macro 'roundup' defined here
^
4 errors generated.
Approved by: portmgr (blanket)
Diffstat (limited to 'biology')
-rw-r--r-- | biology/libbigwig/files/patch-bwValues.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/biology/libbigwig/files/patch-bwValues.c b/biology/libbigwig/files/patch-bwValues.c new file mode 100644 index 000000000000..af1a590abdb8 --- /dev/null +++ b/biology/libbigwig/files/patch-bwValues.c @@ -0,0 +1,29 @@ +--- bwValues.c.orig 2023-12-28 21:21:29 UTC ++++ bwValues.c +@@ -6,7 +6,7 @@ + #include <zlib.h> + #include <errno.h> + +-static uint32_t roundup(uint32_t v) { ++static uint32_t bwRoundup(uint32_t v) { + v--; + v |= v >> 1; + v |= v >> 2; +@@ -347,7 +347,7 @@ static bwOverlappingIntervals_t *pushIntervals(bwOverl + //Returns NULL on error, in which case o has been free()d + static bwOverlappingIntervals_t *pushIntervals(bwOverlappingIntervals_t *o, uint32_t start, uint32_t end, float value) { + if(o->l+1 >= o->m) { +- o->m = roundup(o->l+1); ++ o->m = bwRoundup(o->l+1); + o->start = realloc(o->start, o->m * sizeof(uint32_t)); + if(!o->start) goto error; + o->end = realloc(o->end, o->m * sizeof(uint32_t)); +@@ -367,7 +367,7 @@ static bbOverlappingEntries_t *pushBBIntervals(bbOverl + + static bbOverlappingEntries_t *pushBBIntervals(bbOverlappingEntries_t *o, uint32_t start, uint32_t end, char *str, int withString) { + if(o->l+1 >= o->m) { +- o->m = roundup(o->l+1); ++ o->m = bwRoundup(o->l+1); + o->start = realloc(o->start, o->m * sizeof(uint32_t)); + if(!o->start) goto error; + o->end = realloc(o->end, o->m * sizeof(uint32_t)); |