ibmibmibm / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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

Original issue reported on code.google.com by soumya.p...@gmail.com on 10 Oct 2013 at 11:21

GoogleCodeExporter commented 9 years ago
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) {

Original comment by cassi...@polaco.pro.br on 19 Feb 2015 at 5:21