[asterisk-commits] kharwell: branch 12 r401327 - in /branches/12: ./ main/editline/term.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 21 14:48:31 CDT 2013


Author: kharwell
Date: Mon Oct 21 14:48:28 2013
New Revision: 401327

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=401327
Log:
Segfault in LIBEDIT_INTERNAL after tgetstr(), when libncurses5-dev
isn't installed

Include the appropriate declarations when not using termcap, but term+curses
and [n]curses do not exist.

(closes issue ASTERISK-22351)
Reported by: A. Iglesias
Patches:
    issueA22351_libedit_internal_without_ncurses_dev.patch uploaded by wdoekes (license 5674)
........

Merged revisions 401325 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 401326 from http://svn.asterisk.org/svn/asterisk/branches/11

Modified:
    branches/12/   (props changed)
    branches/12/main/editline/term.c

Propchange: branches/12/
------------------------------------------------------------------------------
Binary property 'branch-11-merged' - no diff available.

Modified: branches/12/main/editline/term.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/main/editline/term.c?view=diff&rev=401327&r1=401326&r2=401327
==============================================================================
--- branches/12/main/editline/term.c (original)
+++ branches/12/main/editline/term.c Mon Oct 21 14:48:28 2013
@@ -65,15 +65,17 @@
 #include <ncurses.h>
 #endif
 #if defined(HAVE_TERM_H)
+/* Can not use /usr/include/term.h because of a lot of incompatibilities, so just define some prototypes */
 #include "term.h"
-/* Can not use /usr/include/term.h because of a lot of incompatibilities, so just define some prototypes */
+#endif /* defined(HAVE_TERM_H) */
+#if defined(HAVE_TERM_H) || !(defined(HAVE_TERMCAP_H) || defined(HAVE_CURSES_H) || defined(HAVE_NCURSES_H))
 extern int tgetent(char *, const char *);
 extern int tgetflag(const char *);
 extern int tgetnum(const char *);
 extern char *tgetstr(const char *, char **);
 extern int tputs (const char *, int, int (*)(int));
 extern char *tgoto (const char *, int, int);
-#endif /* defined(HAVE_TERM_H) */
+#endif /* defined(HAVE_TERM_H) or none_of_the_others */
 #include <sys/types.h>
 #include <sys/ioctl.h>
 




More information about the asterisk-commits mailing list