linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael Kerrisk (man-pages)" <mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Benjamin Poirier <bpoirier-l3A5Bk7waGM@public.gmane.org>
Cc: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
	linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] udp.7: Add missing #include directive.
Date: Sat, 27 Jul 2013 12:18:13 +0200	[thread overview]
Message-ID: <51F39E65.6080807@gmail.com> (raw)
In-Reply-To: <1374850725-11310-1-git-send-email-bpoirier-l3A5Bk7waGM@public.gmane.org>

On 07/26/13 16:58, Benjamin Poirier wrote:
> Using the UDP_CORK socket option documented in udp.7 requires including
> <netinet/udp.h>.

Thanks, Benjamin. Applied.

Cheers,

Michael


> Signed-off-by: Benjamin Poirier <bpoirier-l3A5Bk7waGM@public.gmane.org>
> ---
> 
> Here's a small test program:
> 
> <<<<<<<< minicork.c
> #include <netinet/in.h>
> #include <netinet/ip.h>
> //#include <netinet/udp.h>
> 
> 
> int main()
> {
> 	int fd, option;
> 
> 	fd = socket(AF_INET, SOCK_DGRAM, 0);
> 
> 	option = 1;
> 	setsockopt(fd, IPPROTO_UDP, UDP_CORK, &option, sizeof(option));
> 
> 	return 0;
> }
>>>>>>>>>
> 
> ---
>  man7/udp.7 |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/man7/udp.7 b/man7/udp.7
> index 313c78d..e2e723a 100644
> --- a/man7/udp.7
> +++ b/man7/udp.7
> @@ -16,6 +16,8 @@ udp \- User Datagram Protocol for IPv4
>  .B #include <sys/socket.h>
>  .br
>  .B #include <netinet/in.h>
> +.br
> +.B #include <netinet/udp.h>
>  .sp
>  .B udp_socket = socket(AF_INET, SOCK_DGRAM, 0);
>  .SH DESCRIPTION
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2013-07-27 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-26 14:58 [PATCH] udp.7: Add missing #include directive Benjamin Poirier
     [not found] ` <1374850725-11310-1-git-send-email-bpoirier-l3A5Bk7waGM@public.gmane.org>
2013-07-27 10:18   ` Michael Kerrisk (man-pages) [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51F39E65.6080807@gmail.com \
    --to=mtk.manpages-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=bpoirier-l3A5Bk7waGM@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).