From 1fbe9f6f17cc7df53d213d5c2f6b35b195b0ed62 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Fri, 8 Jun 2018 08:10:44 +0200 Subject: [PATCH] busybox: make httpd work when built with clang --- packages/busybox/build-with-clang.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/busybox/build-with-clang.patch b/packages/busybox/build-with-clang.patch index b875f3348..a4e1f306a 100644 --- a/packages/busybox/build-with-clang.patch +++ b/packages/busybox/build-with-clang.patch @@ -20,3 +20,13 @@ Patch inspired by http://landley.net/mantis/mantis-2344.html less_gets_pos = -1; \ empty_line_marker = "~"; \ num_files = 1; \ +--- ../httpd.c.orig 2018-06-08 06:06:10.426529411 +0000 ++++ ./networking/httpd.c 2018-06-08 06:08:25.886684451 +0000 +@@ -489,6 +489,7 @@ + #define INIT_G() do { \ + setup_common_bufsiz(); \ + SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ ++ asm volatile("":::"memory"); + IF_FEATURE_HTTPD_BASIC_AUTH(g_realm = "Web Server Authentication";) \ + IF_FEATURE_HTTPD_RANGES(range_start = -1;) \ + bind_addr_or_port = "8080"; \