summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOBATA Akio <obache@wizdas.com>2019-04-18 18:40:08 +0900
committerOBATA Akio <obache@wizdas.com>2019-04-20 18:08:58 +0900
commit2c18879814fa01d3bd9de69625c8ff1791f793b6 (patch)
tree66962ca9c72aefdb7ca467f30aeb0cd2c89358c9
parentd3b49e3ec5524f2e16f96210f450ddb9f8f07070 (diff)
downloadtdenetwork-2c18879814fa01d3bd9de69625c8ff1791f793b6.tar.gz
tdenetwork-2c18879814fa01d3bd9de69625c8ff1791f793b6.zip
Change to just include <utmpx.h> over <utmp.h>
Including deprecated <utmp.h> over standard <utmpx.h> may cause unwanted side effects, for example, enables old-code-compatibility functions and override utmpx functions. Signed-off-by: OBATA Akio <obache@wizdas.com>
-rw-r--r--ktalkd/ktalkd/includ.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/ktalkd/ktalkd/includ.h b/ktalkd/ktalkd/includ.h
index 923b452d..f26d21be 100644
--- a/ktalkd/ktalkd/includ.h
+++ b/ktalkd/ktalkd/includ.h
@@ -55,11 +55,10 @@
#define NEW_CTL_RESPONSE CTL_RESPONSE
#include "otalkd.h"
-#ifdef HAVE_UTMP_H
-#include <utmp.h>
-#endif
#ifdef HAVE_UTMPX_H
#include <utmpx.h>
+#elif defined HAVE_UTMP_H
+#include <utmp.h>
#endif
#ifndef UT_LINESIZE
#define UT_LINESIZE 12