Export to GitHub

shellinabox - issue #238

Getting error shellinabox/launcher.c:604:25: error: dereferencing pointer to incomplete type while compiling


Posted on Oct 10, 2013 by Helpful Camel

I was cross compiling shell in a box for mipsel_linux. I gave the command ./configure --prefix=/home/sopandiy/flare/shell --host=mipsel-linux It got configured well but still when i give a make i get the following error : In function 'x_updwtmpx': shellinabox/launcher.c:604:25: error: dereferencing pointer to incomplete type shellinabox/launcher.c:605:25: error: dereferencing pointer to incomplete type shellinabox/launcher.c:606:25: error: dereferencing pointer to incomplete type shellinabox/launcher.c:607:25: error: dereferencing pointer to incomplete type shellinabox/launcher.c:608:27: error: dereferencing pointer to incomplete type shellinabox/launcher.c:609:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:609:10: warning: type defaults to 'int' in declaration of '_b' shellinabox/launcher.c:609:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:610:25: error: dereferencing pointer to incomplete type shellinabox/launcher.c:611:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:611:10: warning: type defaults to 'int' in declaration of '_b' shellinabox/launcher.c:611:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:612:27: error: dereferencing pointer to incomplete type shellinabox/launcher.c:613:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:613:10: warning: type defaults to 'int' in declaration of '_b' shellinabox/launcher.c:613:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:614:27: error: dereferencing pointer to incomplete type shellinabox/launcher.c:615:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c:615:10: warning: type defaults to 'int' in declaration of '_b' shellinabox/launcher.c:615:10: error: dereferencing pointer to incomplete type shellinabox/launcher.c: At top level: shellinabox/launcher.c:602:13: warning: 'x_updwtmpx' defined but not used make[1]: * [launcher.o] Error 1

Please tell me what could be wrong

Comment #1

Posted on Feb 19, 2015 by Happy Ox

This patch solves this issue.

diff -rupN shellinabox-214.a/shellinabox/launcher.c shellinabox-214.b/shellinabox/launcher.c --- shellinabox-214.a/shellinabox/launcher.c 2010-07-09 15:48:51.000000000 +0000 +++ shellinabox-214.b/shellinabox/launcher.c 2015-02-19 15:11:45.535180959 +0000 @@ -495,6 +495,7 @@ struct Utmp *newUtmp(int useLogin, const return utmp; }

+/* #if defined(HAVE_UPDWTMP) && !defined(HAVE_UPDWTMPX) #define min(a,b) ({ typeof(a) _a=(a); typeof(b) _b=(b); _a < _b ? _a : _b; }) #define updwtmpx x_updwtmpx @@ -516,6 +517,7 @@ static void updwtmpx(const char wtmpx_f updwtmp(wtmpx_file, &ut); } #endif +/

void destroyUtmp(struct Utmp *utmp) { if (utmp) {

Status: New

Labels:
Type-Defect Priority-Medium