diff options
Diffstat (limited to '')
-rw-r--r-- | src/errno.c | 1 | ||||
-rw-r--r-- | src/libgen.c | 7 | ||||
-rw-r--r-- | src/wchar/wcsdup.c | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/errno.c b/src/errno.c index 80b46fe..aae7513 100644 --- a/src/errno.c +++ b/src/errno.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <errno.h> +#include <stddef.h> diff --git a/src/libgen.c b/src/libgen.c index f8c338b..8ab303e 100644 --- a/src/libgen.c +++ b/src/libgen.c @@ -20,6 +20,9 @@ #include <stddef.h> +# pragma GCC diagnostic ignored "-Wdiscarded-qualifiers" + + /** * Get the basename of a filename. @@ -63,9 +66,9 @@ char* __xpg_basename(char* filename) { char* r = __gnu_basename(filename); char* p; - if (strcmp(".")) + if (strcmp(r, ".")) for (p = r + 1; *p; p++) - if (p == '/') + if (*p == '/') *p = 0; return r; } diff --git a/src/wchar/wcsdup.c b/src/wchar/wcsdup.c index 37b57f9..fa68834 100644 --- a/src/wchar/wcsdup.c +++ b/src/wchar/wcsdup.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <wchar.h> +#include <stdlib.h> |