Commit 3d2bd03
committed
fixup??? mimalloc: adjust for building inside Git
There is not actually any need to include all of `git-compat-util.h`,
now that the relevant parts were moved to `compat/posix.h`.
It also fixes a compile problem with USE_MIMALLOC on Linux: the
`skip_iprefix()` function needs to have the `tolower()` function defined
already, but when included from `reftable/basics.c` that is not the case
due to the peculiar #include chain. The symptom looks like this:
In file included from compat/mimalloc/mimalloc.h:98, from ./compat/posix.h:180,
from reftable/system.h:14,
from reftable/basics.h:16,
from reftable/basics.c:10:
./git-compat-util.h: In function ‘skip_iprefix’:
./git-compat-util.h:907:18: error: implicit declaration of function ‘tolower’ [-Werror=implicit-function-declaration]
907 | } while (tolower(*str++) == tolower(*prefix++));
| ^~~~~~~
./git-compat-util.h:468:1: note: include ‘<ctype.h>’ or provide a declaration of ‘tolower’
467 | #include "wrapper.h"
+++ |+#include <ctype.h>
468 |
This is easily fixed by including just `compat/posix.h` and not
`git-compat-util.h` (since the latter #includes the former, this
is essentially a nice scope reduction).
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>1 parent 343b22f commit 3d2bd03
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
0 commit comments