diff options
author | Kay Sievers <kay@vrfy.org> | 2012-10-22 14:31:46 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-10-22 14:31:46 +0200 |
commit | a9e12476ed32256690eb801099c41526834b6390 (patch) | |
tree | 73d95988cc9bb4078e2b4c8695be3f3bb9a4c578 /src/shared/util.h | |
parent | 1d870ac769c70bae86fed63d9c5a1c42d2af9da3 (diff) |
util: add (x)bsearch_r(), the missing counterpart of qsort_r()
Diffstat (limited to 'src/shared/util.h')
-rw-r--r-- | src/shared/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index 77d28751f0..a9c39b867e 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -563,3 +563,7 @@ bool filename_is_safe(const char *p); bool string_is_safe(const char *p); int parse_timestamp(const char *t, usec_t *usec); + +void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, + int (*compar) (const void *, const void *, void *), + void *arg); |