diff options
author | Theodore Ts'o <tytso@mit.edu> | 2024-04-21 01:07:14 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2024-04-21 01:07:14 -0400 |
commit | 4646451100d1d2f0761c6684480145a2709e9c2d (patch) | |
tree | 4352dcfc5197bf97119794c6572f14ceee61feeb | |
parent | 4b819954e861d1fdf8c37902e5338e76d9a11f09 (diff) | |
download | e2fsprogs-4646451100d1d2f0761c6684480145a2709e9c2d.tar.gz |
libsupport: fix sort_r.h to work on FreeBSD 14
FreeBSD 14 has changed the definition of qsort_r to align it with the
POSIX, but it did this with a #define. So when sort_r.h tries to
provide a function prototype, surround the function name with
parenthesis so it doesn't get expanded by FreeBSD's #define.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
-rw-r--r-- | lib/support/sort_r.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/support/sort_r.h b/lib/support/sort_r.h index 8473ca834..660294e0a 100644 --- a/lib/support/sort_r.h +++ b/lib/support/sort_r.h @@ -267,7 +267,7 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w, #if defined _SORT_R_GNU typedef int(* __compar_d_fn_t)(const void *, const void *, void *); - extern void qsort_r(void *base, size_t nel, size_t width, + extern void (qsort_r)(void *base, size_t nel, size_t width, __compar_d_fn_t __compar, void *arg) __attribute__((nonnull (1, 4))); |