Bug 4994 - Compiler error when building ntpd without NTPD_SERVER
Summary: Compiler error when building ntpd without NTPD_SERVER
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Networking (show other bugs)
Version: unspecified
Hardware: All All
: P5 minor
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-28 13:59 UTC by Christian Kästner
Modified: 2012-07-10 23:29 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.