From dfed3812ceeeadf728ed9ae9ec3fb59377dd2300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 12 Oct 2022 17:53:11 +0800 Subject: [PATCH] Title: don't include unnecessary headers --- src/detection/title.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detection/title.c b/src/detection/title.c index 50482977f..df9367ba0 100644 --- a/src/detection/title.c +++ b/src/detection/title.c @@ -4,13 +4,14 @@ #include #include -#include #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 64 #endif #ifdef __linux__ +#include + static void detectFQDN(FFTitleResult* title) { struct addrinfo hints = {0}; @@ -54,7 +55,7 @@ const FFTitleResult* ffDetectTitle(const FFinstance* instance) ffStrbufAppendS(&result.hostname, instance->state.utsname.nodename); ffStrbufInitA(&result.fqdn, HOST_NAME_MAX); - #ifdef __linux + #ifdef __linux__ detectFQDN(&result); #endif if(result.fqdn.length == 0)