]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: namespaces: use the build options list to report it
authorWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 17:51:45 +0000 (18:51 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 21 Dec 2016 20:30:54 +0000 (21:30 +0100)
This removes one #ifdef from haproxy.c.

src/haproxy.c
src/namespace.c

index 63edbd6a8d5d9b1df3d7a7ee9730b244e5780523..22b6ffaee97370ac8304025e242b4d650a9ae53c 100644 (file)
@@ -454,10 +454,6 @@ static void display_build_opts()
               "\n");
 #endif
 
-#if defined(CONFIG_HAP_NS)
-       printf("Built with network namespace support\n");
-#endif
-
        list_for_each_entry(item, &build_opts_list, list) {
                puts(item->str);
        }
index e5ebfd77672fed460c4d80eb5cfd680cce499817..a8f14c8b32d960c4e9b958b8fbdd54cfde24d406 100644 (file)
@@ -112,3 +112,9 @@ int my_socketat(const struct netns_entry *ns, int domain, int type, int protocol
 
        return sock;
 }
+
+__attribute__((constructor))
+static void __ns_init(void)
+{
+       hap_register_build_opts("Built with network namespace support.", 0);
+}