Bug 2402 - Missing include in kex.h results in compilation error due to unknown type
Summary: Missing include in kex.h results in compilation error due to unknown type
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: Kerberos support (show other bugs)
Version: 6.8p1
Hardware: SPARC Solaris
: P5 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_6_9
  Show dependency treegraph
 
Reported: 2015-05-22 00:55 AEST by Tomas Kuthan
Modified: 2016-08-02 10:41 AEST (History)
1 user (show)

See Also:


Attachments
Simple patch reverting removal of the include statement. (302 bytes, patch)
2015-05-22 00:57 AEST, Tomas Kuthan
no flags Details | Diff
including signal.h in gss-genr.c (248 bytes, patch)
2015-05-22 09:46 AEST, Darren Tucker
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Kuthan 2015-05-22 00:55:17 AEST
#include <signal.h> has been removed from kex.h.

On Solaris, this causes a compilation error due to sig_atomic_t type being undefined.

/usr/gcc/4.7/bin/gcc -m64 -O3  -DSET_USE_PAM -DDEPRECATE_SUNSSH_OPT -DKRB5_BUILD_FIX -DDTRACE_SFTP -DDISABLE_BANNER -DPAM_ENHANCEMENT -DPAM_BUGFIX -DOPTION_DEFAULT_VALUE -DWITHOUT_ED25519 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare -Wformat-security -Wno-pointer-sign -Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv -fno-builtin-memset -fstack-protector-all  -I. -I/builds2/tkuthan/ul-ssh6_8/components/openssh/openssh-6.8p1  -I/usr/include/editline   -I/usr/include/kerberosv5 -I/usr/include -DSSHDIR=\"/etc/ssh\" -D_PATH_SSH_PROGRAM=\"/usr/bin/ssh\" -D_PATH_SSH_ASKPASS_DEFAULT=\"/usr/lib/ssh/ssh-askpass\" -D_PATH_SFTP_SERVER=\"/usr/lib/ssh/sftp-server\" -D_PATH_SSH_KEY_SIGN=\"/usr/lib/ssh/ssh-keysign\" -D_PATH_SSH_PKCS11_HELPER=\"/usr/lib/ssh/ssh-pkcs11-helper\" -D_PATH_SSH_PIDDIR=\"/var/run\" -D_PATH_PRIVSEP_CHROOT_DIR=\"/var/empty\" -DHAVE_CONFIG_H -c /builds2/tkuthan/ul-ssh6_8/components/openssh/openssh-6.8p1/gss-genr.c -o gss-genr.o
In file included from /builds2/tkuthan/ul-ssh6_8/components/openssh/openssh-6.8p1/gss-genr.c:45:0:
/builds2/tkuthan/ul-ssh6_8/components/openssh/openssh-6.8p1/kex.h:147:2: error: unknown type name 'sig_atomic_t'
make[1]: *** [gss-genr.o] Error
Comment 1 Tomas Kuthan 2015-05-22 00:57:01 AEST
Created attachment 2625 [details]
Simple patch reverting removal of the include statement.
Comment 2 Darren Tucker 2015-05-22 09:46:22 AEST
Created attachment 2626 [details]
including signal.h in gss-genr.c

For the most part we are trying to have things included in the source file where it's needed rather than have headers include other headers.  Does this fix it?
Comment 3 Tomas Kuthan 2015-05-22 17:36:06 AEST
Yes, that works fine too.
(That, plus fixing GSS-API key exchange sources, but that is a different story.)

Thanks.
Comment 4 Darren Tucker 2015-05-22 17:51:58 AEST
thanks.  patch applied and will be in the 6.9p1 release.
Comment 5 Tomas Kuthan 2015-05-22 18:04:28 AEST
Great! Thank you.
Comment 6 Damien Miller 2016-08-02 10:41:45 AEST
Close all resolved bugs after 7.3p1 release