GNOME Bugzilla – Bug 324709
login_tty, a Linux function, breaks build on Solaris
Last modified: 2007-01-12 09:32:34 UTC
libgnomevfs/gnome-vfs-pty.c has a call to login_tty which does not exist on Solaris. Solaris uses utmpx, not utmp like Linux. Attached patch checks for Solaris (#if !defined (sun)).
Created attachment 56254 [details] [review] Don't compile login_tty call on Solaris
Thanks for your bug report! Maybe you could submit the attached patch to the gnome-vfs mailing list [1] for review? [1] http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
Christian: Really? The patch is crap - it disables code just because I was building on Solaris. It's not the right solution. Or do you want me to submit it to get a conversation going?
I don't understand the code, so I can't comment on it. Whatever it does, can't it be done in a POSIX-compliant way suitable for all modern UNICes?
Essentially the patch '#ifdef's a few lines out. This is hardly the correct solution. Someone needs to port login_tty to the Solaris functions. Such a task is beyond me. If no one at your end knows how to do this, I could see if a developer here can help.
Indeed, I'd strongly prefer if the Solaris utmp.h header provided what my libc header promises, for the sake of simplifiying ports. Popular BSDs also seems to provide login_tty in utmp.h.
*** Bug 340278 has been marked as a duplicate of this bug. ***
Created attachment 80033 [details] [review] Provide local version of login_tty() for Solaris (or any OS where login_tty not found). login_tty() function came from: http://www-sor.inria.fr/~piumarta/squeak/stable/platforms/unix/plugins/PseudoTTYPlugin/openpty.h There is another version at: http://csourcesearch.net/package/multi-gnome-terminal/1.6.2/multi-gnome-terminal-1.6.2/gnome-terminal/gnome-login-support.c
Commited (but i can't test it). Thanks.