diff -burNp gammu-1.23.1/libgammu/gsmstate.c gammu-1.23.1-dud/libgammu/gsmstate.c --- gammu-1.23.1/libgammu/gsmstate.c 2009-02-12 15:05:40.000000000 +0100 +++ gammu-1.23.1-dud/libgammu/gsmstate.c 2009-03-14 21:19:03.565653553 +0100 @@ -1021,6 +1021,7 @@ GSM_Error GSM_FindGammuRC (INI_Section * { char configfile[PATH_MAX + 1]; char *envpath; + char *home_etc; GSM_Error error; *result = NULL; @@ -1042,6 +1043,15 @@ GSM_Error GSM_FindGammuRC (INI_Section * /* Reset as we're using strcat */ configfile[0] = 0; + /* Try user etc dir */ + home_etc = getenv("HOME_ETC"); + if (home_etc) { + strcat(configfile, home_etc); + strcat(configfile, GAMMURC_NAME); + + error = GSM_TryReadGammuRC(configfile, result); + if (error == ERR_NONE) return ERR_NONE; + } else { /* Try user home */ envpath = getenv("HOME"); if (envpath) { @@ -1051,6 +1061,7 @@ GSM_Error GSM_FindGammuRC (INI_Section * error = GSM_TryReadGammuRC(configfile, result); if (error == ERR_NONE) return ERR_NONE; } + } #if defined(WIN32) /* Reset as we're using strcat */