Bug 269 - Additional C99 syntax in NSD 3.2.3
Additional C99 syntax in NSD 3.2.3
Status: RESOLVED FIXED
Product: NSD
Classification: Unclassified
Component: NSD Code
3.2.x
Other Linux
: P2 minor
Assigned To: NSD team
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-17 21:55 CEST by John Lightsey
Modified: 2009-08-18 09:38 CEST (History)
1 user (show)

See Also:


Attachments
Patch to undo C99 syntax (589 bytes, patch)
2009-08-18 09:33 CEST, Matthijs Mekking
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Lightsey 2009-08-17 21:55:53 CEST
Trivial problem, but line 760 of nsd.c in version 3.2.3 contains a variable declaration in the middle of a code block.

#ifdef HAVE_GETPWNAM
        struct passwd *pwd;

This causes the compile to fail on older versions of GCC that don't implement this c99 feature (saw the error with GCC 2.95)
Comment 1 Matthijs Mekking 2009-08-18 09:33:53 CEST
Created attachment 113 [details]
Patch to undo C99 syntax
Comment 2 Matthijs Mekking 2009-08-18 09:38:07 CEST
Damn (pardon my french). Though I checked on the functions conformance, I did not take the syntax into account. I have created a patch to undo this and have fixed it in trunk.