Bug 4994

Summary: Compiler error when building ntpd without NTPD_SERVER
Product: Busybox Reporter: Christian Kästner <christian.kaestner>
Component: NetworkingAssignee: unassigned
Status: RESOLVED FIXED    
Severity: minor CC: busybox-cvs
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Host: Target:
Build:

Description Christian Kästner 2012-03-28 13:59:44 UTC
Affects the current development version since commit 97e52816:

When compiling any configuration with CONFIG_NTPD and without CONFIG_FEATURE_NTPD_SERVER, the compiler issues an error:

  CC      networking/ntpd.o
networking/ntpd.c: In function ntpd_main:
networking/ntpd.c:2128:44: error: struct globals has no member named listen_fd


The problem is member listen_fd of struct globals, which is only defined if CONFIG_FEATURE_NTPD_SERVER is selected, but it is referenced in all configurations in line 2128. Instead of an if, there probably should be an #if, but the code is to complicated for me to suggest a proper patch.
Comment 1 Denys Vlasenko 2012-04-01 14:32:28 UTC
Should be fixed in current git. Please report if it is not.