diff options
Diffstat (limited to 'gdb/top.c')
-rw-r--r-- | gdb/top.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -71,10 +71,18 @@ /* Initialization file name for gdb. This is overridden in some configs. */ +#ifndef PATH_MAX +# ifdef FILENAME_MAX +# define PATH_MAX FILENAME_MAX +# else +# define PATH_MAX 512 +# endif +#endif + #ifndef GDBINIT_FILENAME #define GDBINIT_FILENAME ".gdbinit" #endif -char gdbinit[] = GDBINIT_FILENAME; +char gdbinit[PATH_MAX + 1] = GDBINIT_FILENAME; int inhibit_gdbinit = 0; |