Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 544526

Summary: app-editors/nano-2.4.0 __time_t undeclared compilation error
Product: Gentoo/Alt Reporter: iloveosxzfs
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED UPSTREAM    
Severity: normal CC: iloveosxzfs, srcshelton
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: OS X   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
Patch for nano-2.4.0 on OS X
emerge info
emerge pqv

Description iloveosxzfs 2015-03-26 05:53:44 UTC
Created attachment 399786 [details]
build log

__ types are usually implementation specific. So it seems upstream ought to be using time_t not __time_t.

text.c: In function 'do_alt_speller':
text.c:2667: error: '__time_t' undeclared (first use in this function)
text.c:2667: error: (Each undeclared identifier is reported only once
text.c:2667: error: for each function it appears in.)
text.c:2667: error: expected ';' before 'timestamp'
text.c:2702: error: 'timestamp' undeclared (first use in this function)

With this patch, it builds:

joe@Josephs-MacBook-Pro ~/gentoo $ cat etc/portage/patches/app-editors/nano-2.4.0/nano-2.4.0-time_t.disabled 
--- src/text.c	2015-03-25 22:38:47.000000000 -0700
+++ src/text.c	2015-03-25 22:39:20.000000000 -0700
@@ -2664,7 +2664,7 @@
     ssize_t current_y_save = openfile->current_y;
     ssize_t lineno_save = openfile->current->lineno;
     struct stat spellfileinfo;
-    __time_t timestamp;
+    time_t timestamp;
     pid_t pid_spell;
     char *ptr;
     static int arglen = 3;
Comment 1 iloveosxzfs 2015-03-26 05:54:54 UTC
Created attachment 399788 [details, diff]
Patch for nano-2.4.0 on OS X
Comment 2 iloveosxzfs 2015-03-26 05:56:39 UTC
Created attachment 399790 [details]
emerge info
Comment 3 iloveosxzfs 2015-03-26 05:57:21 UTC
Created attachment 399792 [details]
emerge pqv
Comment 4 Justin 2015-04-04 14:26:49 UTC
I just ran in to this as well during a bootstrap. Thankfully iloveosxzfs put in the hint about "cat ~/gentoo/etc/portage/patches/app-editors/nano-2.4.0/nano-2.4.0-time_t.patch" as I was able to download the patch, put it in this directory, and continue on with my bootstrap (by simply re-running ./bootstrap-prefix.sh).

I did have to name the file nano-2.4.0-time_t.patch as opposed to nano-2.4.0-time_t.disabled.

Thanks iloveosxzfs!
Comment 5 iloveosxzfs 2015-04-15 12:23:11 UTC
This is now fixed in upstream nano-2.4.1.
http://savannah.gnu.org/bugs/?44609