Master Does Not Compile on Centos 6

Joel Sherrill joel at rtems.org
Thu Jun 30 20:36:17 UTC 2016


Hi

This likely fails on other platforms since it is a mismatched brace:

../../ntpd/ntp_config.c: In function ‘config_peers’:
../../ntpd/ntp_config.c:3207: error: ‘else’ without a previous ‘if’
../../ntpd/ntp_config.c: At top level:
../../ntpd/ntp_config.c:3252: error: expected identifier or ‘(’ before ‘}’
token

The fix appears to be pretty simple. The ifdef and { are swapped

$ git diff
diff --git a/ntpd/ntp_config.c b/ntpd/ntp_config.c
index cf2a6f5..d0eeb26 100644
--- a/ntpd/ntp_config.c
+++ b/ntpd/ntp_config.c
@@ -3169,8 +3169,8 @@ config_peers(
                                        curr_peer->ttl,
                                        curr_peer->peerkey);
                                if (ISREFCLOCKADR(&peeraddr))
-#ifdef REFCLOCK
                                {
+#ifdef REFCLOCK
                                        uint8_t clktype;
                                        int unit;
                                        /*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/devel/attachments/20160630/48b0ea70/attachment.html>


More information about the devel mailing list