diff --git a/libc/include/stdio.h b/libc/include/stdio.h
index c12ddb812..453cf0b94 100644
--- a/libc/include/stdio.h
+++ b/libc/include/stdio.h
@@ -547,7 +547,7 @@ char *fgets(char *dest, int size, FILE *stream)
     }
 
     // Compiler doesn't know destination size. Don't call __fgets_chk
-    if (bos == (size_t) -1) {
+    if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
         return __fgets_real(dest, size, stream);
     }
 
diff --git a/libc/include/string.h b/libc/include/string.h
index 842aa3922..8730ea3f4 100644
--- a/libc/include/string.h
+++ b/libc/include/string.h
@@ -166,7 +166,7 @@ size_t strlcpy(char *dest, const char *src, size_t size) {
     size_t bos = __builtin_object_size(dest, 0);
 
     // Compiler doesn't know destination size. Don't call __strlcpy_chk
-    if (bos == (size_t) -1) {
+    if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
         return __strlcpy_real(dest, src, size);
     }
 
@@ -197,7 +197,7 @@ size_t strlcat(char *dest, const char *src, size_t size) {
     size_t bos = __builtin_object_size(dest, 0);
 
     // Compiler doesn't know destination size. Don't call __strlcat_chk
-    if (bos == (size_t) -1) {
+    if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
         return __strlcat_real(dest, src, size);
     }
 
@@ -223,9 +223,12 @@ extern size_t __strlen_chk(const char *, size_t);
 __BIONIC_FORTIFY_INLINE
 size_t strlen(const char *s) {
     size_t bos = __builtin_object_size(s, 0);
-    if (bos == (size_t) -1) {
+
+    // Compiler doesn't know destination size. Don't call __strlen_chk
+    if (bos == __BIONIC_FORTIFY_UNKNOWN_SIZE) {
         return __strlen_real(s);
     }
+
     return __strlen_chk(s, bos);
 }
 
diff --git a/libc/include/sys/cdefs.h b/libc/include/sys/cdefs.h
index 1ba9100b9..987a5e3db 100644
--- a/libc/include/sys/cdefs.h
+++ b/libc/include/sys/cdefs.h
@@ -507,6 +507,7 @@
     __attribute__ ((always_inline)) \
     __attribute__ ((gnu_inline)) \
     __attribute__ ((artificial))
+#define __BIONIC_FORTIFY_UNKNOWN_SIZE ((size_t) -1)
 #endif
 
 #endif /* !_SYS_CDEFS_H_ */