| 1 | Authorscip-debian debian garmin-forerunner-tools 0.10repacked-16 garmin-forerunner-tools/patches/hurd_no_path_max#Author.: Ralf Treinen <[email protected]scip-debian . . . identity/`[email protected]`.> |
| 2 | Descriptionscip-debian debian garmin-forerunner-tools 0.10repacked-16 garmin-forerunner-tools/patches/hurd_no_path_max#Description.: Do not use PATH_MAX on hurd |
| 3 | |
| 4 | Index: garmin-forerunner-tools/src/run.cscip-debian debian garmin-forerunner-tools 0.10repacked-16 garmin-forerunner-tools/upstream/`garmin-forerunner-tools/src/run.c`: |
| 5 | =================================================================== |
| 6 | --- garmin-forerunner-tools.orig/src/run.cscip-debian debian garmin-forerunner-tools 0.10repacked-16 garmin-forerunner-tools/upstream/`garmin-forerunner-tools.orig/src/run.c`: 2012-11-19 20:29:13.000000000 +0100 |
| 7 | +++ garmin-forerunner-tools/src/run.c 2012-11-19 20:42:27.000000000 +0100 |
| 8 | @@ -199,19 +199,31 @@ |
| 9 | time_t start_time; |
| 10 | char filename[BUFSIZ]; |
| 11 | char * filedir = NULL; |
| 12 | +#ifdef __GNU__ |
| 13 | + char * path = NULL; |
| 14 | +#else |
| 15 | char path[PATH_MAX]; |
| 16 | +#endif /* __GNU__ */ |
| 17 | char filepath[BUFSIZ]; |
| 18 | struct tm * tbuf; |
| 19 | |
| 20 | if ( (filedir = getenv("GARMIN_SAVE_RUNS")) != NULL ) { |
| 21 | +#ifdef __GNU__ |
| 22 | + filedir = realpath(filedir,NULL); |
| 23 | +#else |
| 24 | filedir = realpath(filedir,path); |
| 25 | +#endif /* __GNU__ */ |
| 26 | if ( filedir == NULL ) { |
| 27 | printf("GARMIN_SAVE_RUNS: %s: %s\n", |
| 28 | getenv("GARMIN_SAVE_RUNS"),strerror(errno)); |
| 29 | } |
| 30 | } |
| 31 | if ( filedir == NULL ) { |
| 32 | +#ifdef __GNU__ |
| 33 | + filedir = getcwd(path,0); |
| 34 | +#else |
| 35 | filedir = getcwd(path,sizeof(path)); |
| 36 | +#endif /* __GNU__ */ |
| 37 | } |
| 38 | |
| 39 | printf("Extracting data from Garmin %s\n", |