diff options
author | Michael Stapelberg <stapelberg@users.noreply.github.com> | 2019-12-25 12:27:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-25 12:27:21 +0100 |
commit | d341b91b0a79390aa7c5f1a8095d3d48ddfef9ad (patch) | |
tree | 77628f1eca8c99b046bb62f255e966edbfa20ef9 /libi3 | |
parent | 50cd151523c2d6379329b946c56d030d8f44e578 (diff) | |
parent | b0d6f44779a9e8d8ed2bb0751d3af3bfd484f1a0 (diff) | |
download | i3-d341b91b0a79390aa7c5f1a8095d3d48ddfef9ad.tar.gz i3-d341b91b0a79390aa7c5f1a8095d3d48ddfef9ad.zip |
Merge pull request #3824 from orestisfl/ac_replace_funcs
Use AC_REPLACE_FUNCS
Diffstat (limited to 'libi3')
-rw-r--r-- | libi3/mkdirp.c | 3 | ||||
-rw-r--r-- | libi3/strndup.c | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/libi3/mkdirp.c b/libi3/mkdirp.c index f5281bd7..35a30475 100644 --- a/libi3/mkdirp.c +++ b/libi3/mkdirp.c @@ -12,12 +12,11 @@ #include <string.h> #include <sys/stat.h> +#ifndef HAVE_mkdirp /* * Emulates mkdir -p (creates any missing folders) * */ - -#if !defined(__sun) int mkdirp(const char *path, mode_t mode) { if (mkdir(path, mode) == 0) return 0; diff --git a/libi3/strndup.c b/libi3/strndup.c index e17f843c..e215a76f 100644 --- a/libi3/strndup.c +++ b/libi3/strndup.c @@ -10,8 +10,7 @@ #include <sys/types.h> #include <string.h> -#if defined(__APPLE__) - +#ifndef HAVE_strndup /* * Taken from FreeBSD * Returns a pointer to a new string which is a duplicate of the @@ -30,5 +29,4 @@ char *strndup(const char *str, size_t n) { copy[len] = '\0'; return (copy); } - #endif |