From: ludo@gnu.org (Ludovic Courtès)
To: Matthew Lien <bluet@bluet.org>
Cc: bug-guix@gnu.org
Subject: Re: FTBFS on GNU/Hurd
Date: Tue, 02 Jul 2013 23:09:20 +0200 [thread overview]
Message-ID: <87mwq4ekjj.fsf@gnu.org> (raw)
In-Reply-To: <CAGurB_hqpmTL1GauqHLTf8EknDHpLc_icAGuKhzyWHTtjUBZtA@mail.gmail.com> (Matthew Lien's message of "Tue, 2 Jul 2013 23:06:35 +0800")
[-- Attachment #1: Type: text/plain, Size: 553 bytes --]
Matthew Lien <bluet@bluet.org> skribis:
> nix/nix-daemon/guix-daemon.cc: In function ‘error_t parse_opt(int, char*, argp_state*)’:
> nix/nix-daemon/guix-daemon.cc:174:14: error: invalid conversion from ‘int’ to ‘error_t {aka __error_t_codes}’ [-fpermissive]
> return ARGP_ERR_UNKNOWN;
> ^
> nix/nix-daemon/guix-daemon.cc:177:10: error: invalid conversion from ‘int’ to ‘error_t {aka __error_t_codes}’ [-fpermissive]
> return 0;
> ^
Could you try changing lines 174 and 177 like this:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 468 bytes --]
diff --git a/nix/nix-daemon/guix-daemon.cc b/nix/nix-daemon/guix-daemon.cc
index 5f0710c..e2c30e7 100644
--- a/nix/nix-daemon/guix-daemon.cc
+++ b/nix/nix-daemon/guix-daemon.cc
@@ -171,10 +171,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
settings.thisSystem = arg;
break;
default:
- return ARGP_ERR_UNKNOWN;
+ return (error_t) ARGP_ERR_UNKNOWN;
}
- return 0;
+ return (error_t) 0;
}
/* Argument parsing. */
[-- Attachment #3: Type: text/plain, Size: 293 bytes --]
This is not a problem on GNU/Linux where argp.h does this:
#ifndef __error_t_defined
typedef int error_t;
# define __error_t_defined
#endif
... whereas on GNU/Hurd ‘error_t’ is a enum, and is always defined:
typedef enum __error_t_codes error_t;
TIA,
Ludo’.
next prev parent reply other threads:[~2013-07-02 21:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 15:06 FTBFS on GNU/Hurd Matthew Lien
2013-07-02 18:53 ` Cyril Roelandt
2013-07-02 21:13 ` Ludovic Courtès
2013-07-03 7:42 ` Matthew Lien
2013-07-02 21:09 ` Ludovic Courtès [this message]
2013-07-03 7:46 ` Matthew Lien
2013-07-03 9:38 ` Ludovic Courtès
2013-07-03 15:58 ` Matthew Lien
2013-07-04 11:46 ` Ludovic Courtès
2013-07-04 14:00 ` Matthew Lien
2013-07-04 14:23 ` Ludovic Courtès
2013-07-04 15:40 ` Matthew Lien
2013-07-04 20:42 ` Ludovic Courtès
2013-07-05 9:05 ` BlueT - Matthew Lien - 練喆明
2013-07-05 9:55 ` Ludovic Courtès
2013-07-05 11:16 ` BlueT - Matthew Lien - 練喆明
2013-07-05 11:47 ` Ludovic Courtès
2013-07-04 20:54 ` Ludovic Courtès
2013-07-05 9:30 ` BlueT - Matthew Lien - 練喆明
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://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mwq4ekjj.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=bluet@bluet.org \
--cc=bug-guix@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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
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).