Skip to content

Commit 765ad8b

Browse files
committed
Fix guard around alloc_hugetlb, fixes compile warning
The warning was: ``` /home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c: At top level: /home/rgommers/code/pixi-dev-scipystack/openblas/OpenBLAS/driver/others/memory.c:2565:14: warning: 'alloc_hugetlb' defined but not used [-Wunused-function] 2565 | static void *alloc_hugetlb(void *address){ | ^~~~~~~~~~~~~ ``` The added define is the same as is already present in the TLS part of `memory.c`. This follows up on gh-4681.
1 parent 48caf23 commit 765ad8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

driver/others/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2538,7 +2538,7 @@ static void *alloc_shm(void *address){
25382538
}
25392539
#endif
25402540

2541-
#if defined OS_LINUX || defined OS_AIX || defined __sun__ || defined OS_WINDOWS
2541+
#if ((defined ALLOC_HUGETLB) && (defined OS_LINUX || defined OS_AIX || defined __sun__ || defined OS_WINDOWS))
25422542

25432543
static void alloc_hugetlb_free(struct release_t *release){
25442544

0 commit comments

Comments
 (0)