bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FTBFS on GNU/Hurd


From: Ludovic Courtès
Subject: Re: FTBFS on GNU/Hurd
Date: Tue, 02 Jul 2013 23:09:20 +0200
User-agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux)

Matthew Lien <address@hidden> 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:

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.  */
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’.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]