From: Collin Funk Date: Sun, 28 Sep 2025 22:07:59 +0000 (-0700) Subject: manual: Fix missing include in memopen example. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=85a31b7764ceb6a04d1e5677dfe33c45b82d82da;p=thirdparty%2Fglibc.git manual: Fix missing include in memopen example. Previously this file would fail to compile with the following error: $ gcc manual/examples/memopen.c manual/examples/memopen.c: In function ‘main’: manual/examples/memopen.c:28:30: error: implicit declaration of function ‘strlen’ [-Wimplicit-function-declaration] 28 | stream = fmemopen (buffer, strlen (buffer), "r"); | ^~~~~~ manual/examples/memopen.c:19:1: note: include ‘’ or provide a declaration of ‘strlen’ 18 | #include +++ |+#include 19 | manual/examples/memopen.c:28:30: warning: incompatible implicit declaration of built-in function ‘strlen’ [-Wbuiltin-declaration-mismatch] 28 | stream = fmemopen (buffer, strlen (buffer), "r"); | ^~~~~~ manual/examples/memopen.c:28:30: note: include ‘’ or provide a declaration of ‘strlen’ Reviewed-by: Adhemerval Zanella --- diff --git a/manual/examples/memopen.c b/manual/examples/memopen.c index e87006dc45..8ef34fcbfa 100644 --- a/manual/examples/memopen.c +++ b/manual/examples/memopen.c @@ -16,6 +16,7 @@ */ #include +#include static char buffer[] = "foobar";