unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: 25790@debbugs.gnu.org
Subject: bug#25790: guile-2.1.7 SOCK_CLOEXEC etc
Date: Mon, 20 Feb 2017 14:06:14 -0800	[thread overview]
Message-ID: <E11D53F1-3DAD-48AB-8384-AD5A294B8F55@gmail.com> (raw)
In-Reply-To: <750c3b96-c1fb-40cb-b208-0dc2a205d283@me.com>

I see the same problem on Mac OS.

If the following appeared in a header somewhere CLOEXEC would work:
#define SOCK_CLOEXEC FD_CLOEXEC
It would work.  Note the implementation in lib/accept4.c:
#ifndef SOCK_CLOEXEC
#define SOCK_CLOEXEC 0
#endif
Then later the flags to accept4 have SOCK_CLOEXEC set, then the call to fcntl includes FD_CLOEXEC. 
So any system that defines FD_CLOEXEC should be able to use SOCK_CLOEXEC.  But it needs to be defined.

I assume if a system supports O_NONBLOCK then something could be done with SOCK_NONBLOCK also.

I was going to submit a patch that is the same, except that I removed the text “No ifdef as accept4 has a gnulib implementation.”

Matt







  reply	other threads:[~2017-02-20 22:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-19  8:18 bug#25790: SOCK_CLOEXEC and SOCK_NONBLOCK undeclared identifier errors with 2.1.7 ilove zfs
2017-02-20 22:06 ` Matt Wette [this message]
2017-02-21 21:15 ` Andy Wingo

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

  List information: https://www.gnu.org/software/guile/

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

  git send-email \
    --in-reply-to=E11D53F1-3DAD-48AB-8384-AD5A294B8F55@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=25790@debbugs.gnu.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 read-only IMAP folder(s) and NNTP newsgroup(s).