Skip to content

Commit

Permalink
doc: fix the compile fix of txtimestamp.c
Browse files Browse the repository at this point in the history
A fix to ipv6 structure definitions removed the now superfluous
definition of in6_pktinfo in this file.

But, use of the glibc definition requires defining _GNU_SOURCE
(see also https://sourceware.org/bugzilla/show_bug.cgi?id=6775).

Before this change, the following would fail for me:

  make
  make headers_install
  make M=Documentation/networking/timestamping

with

  Documentation/networking/timestamping/txtimestamp.c: In function '__recv_errmsg_cmsg':
  Documentation/networking/timestamping/txtimestamp.c:205:33: error: dereferencing pointer to incomplete type
  Documentation/networking/timestamping/txtimestamp.c:206:23: error: dereferencing pointer to incomplete type

After this patch compilation succeeded.

Fixes: cd91cc5 ("doc: fix the compile error of txtimestamp.c")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Willem de Bruijn authored and David S. Miller committed Jan 12, 2015
1 parent ef5ba4a commit d3b4b26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Documentation/networking/timestamping/txtimestamp.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
* 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
*/

#define _GNU_SOURCE

#include <arpa/inet.h>
#include <asm/types.h>
#include <error.h>
Expand Down

0 comments on commit d3b4b26

Please sign in to comment.