Skip to content

Commit

Permalink
Fix strcmp() build on gcc-9.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
keirf committed Aug 4, 2020
1 parent 7591dbb commit 76747dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions inc/decls.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#include <limits.h>

#include "intrinsics.h"
#include "util.h"
Expand Down
2 changes: 1 addition & 1 deletion src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ size_t strnlen(const char *s, size_t maxlen)

int strcmp(const char *s1, const char *s2)
{
return strncmp(s1, s2, ~0);
return strncmp(s1, s2, INT_MAX);
}

int strncmp(const char *s1, const char *s2, size_t n)
Expand Down

0 comments on commit 76747dd

Please sign in to comment.