After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 620860 - function ‘meta_display_open’:
function ‘meta_display_open’:
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal blocker
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2010-06-07 16:24 UTC by Diska
Modified: 2010-06-07 18:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
0001-Move-use-of-_SVID_SOURCE-to-display.c-for-gethostnam.patch (995 bytes, patch)
2010-06-07 17:09 UTC, Colin Walters
none Details | Review
updated (1.08 KB, patch)
2010-06-07 17:55 UTC, Colin Walters
none Details | Review

Description Diska 2010-06-07 16:24:52 UTC
tryng to compile mutter with last git via jhbuild give me this error:


make[4]: ingresso nella directory «/home/diska/gnome-shell/source/mutter/src»
  CC     display.o
cc1: warnings being treated as errors
core/display.c: In function ‘meta_display_open’:
core/display.c:467: error: implicit declaration of function ‘gethostname’
core/display.c:467: error: nested extern declaration of ‘gethostname’
make[4]: *** [display.o] Errore 1
make[4]: uscita dalla directory «/home/diska/gnome-shell/source/mutter/src»
make[3]: *** [all-recursive] Errore 1
make[3]: uscita dalla directory «/home/diska/gnome-shell/source/mutter/src»
make[2]: *** [all] Errore 2
make[2]: uscita dalla directory «/home/diska/gnome-shell/source/mutter/src»
make[1]: *** [all-recursive] Errore 1
make[1]: uscita dalla directory «/home/diska/gnome-shell/source/mutter»
make: *** [all] Errore 2

the problem is on code 

  if (gethostname (buf, sizeof(buf)-1) == 0)
    {
      buf[sizeof(buf)-1] = '\0';
      the_display->hostname = g_strdup (buf);
    }
Comment 1 Diska 2010-06-07 16:25:36 UTC
on ubuntu lucid 64bit

Distributor ID:	Ubuntu
Description:	Ubuntu 10.04 LTS
Release:	10.04
Codename:	lucid
Comment 2 André Klapper 2010-06-07 16:29:39 UTC
...and you compile with which exact flags?

Can you add
#include <unistd.h>
to src/core/display.c and check whether this still happens?
Comment 3 Diska 2010-06-07 16:40:28 UTC
i'm using defult jhbuild flag.

no change with  #include <unistd.h> same error

i wiped dir and resync with git repository
Comment 4 André Klapper 2010-06-07 16:46:43 UTC
Confirming.
Comment 5 André Klapper 2010-06-07 16:52:01 UTC
...and the recent addition of unistd.h does not fix this for me.
Comment 6 Colin Walters 2010-06-07 16:54:03 UTC
No idea then - someone with the relevant system is going to have to debug this.
Comment 7 André Klapper 2010-06-07 16:55:14 UTC
This is Fedora 12 in jhbuild...
Comment 8 Diska 2010-06-07 16:58:37 UTC
how can i help you?
Comment 9 Colin Walters 2010-06-07 17:09:55 UTC
Created attachment 162951 [details] [review]
0001-Move-use-of-_SVID_SOURCE-to-display.c-for-gethostnam.patch
Comment 10 Colin Walters 2010-06-07 17:55:24 UTC
Created attachment 162958 [details] [review]
updated
Comment 11 Colin Walters 2010-06-07 18:26:48 UTC
The remaining task is figuring out who to bill for that 30 minutes of my life...