Skip to content

Commit ce76182

Browse files
aescolarChromeos LUCI
authored andcommitted
subsys/net/lib/http: Set feature macro as required
This file uses strnlen() but the C library is not require to expose its prototype unless _POSIX_C_SOURCE is defined. So let's define it to avoid an implicit function declaration warning. (cherry picked from commit f131964) Original-Signed-off-by: Alberto Escolar Piedras <[email protected]> GitOrigin-RevId: f131964 Change-Id: I64d37c7cf14a15a72b7b3f79ede789e02f5587ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5653340 Reviewed-by: Ting Shen <[email protected]> Tested-by: ChromeOS Prod (Robot) <[email protected]> Tested-by: Ting Shen <[email protected]> Commit-Queue: Ting Shen <[email protected]>
1 parent 30774d4 commit ce76182

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

subsys/net/lib/http/http_server_http1.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
* SPDX-License-Identifier: Apache-2.0
66
*/
77

8+
#undef _POSIX_C_SOURCE
9+
#define _POSIX_C_SOURCE 200809L /* Required for strnlen() */
10+
811
#include <errno.h>
912
#include <stdbool.h>
1013
#include <stdio.h>

0 commit comments

Comments
 (0)