X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=oslib%2Flibmtd_common.h;h=3f9e1b8c1e5e912f6e314e1a2af778cb1ea6d225;hp=9768066b6a4449a562802ba972c6507eaf044494;hb=2ad9c0bb913d75abe5e06d7ce40237b3772fec5b;hpb=bd553af6c8498deb87d666b7fa6d5750498a2c1b diff --git a/oslib/libmtd_common.h b/oslib/libmtd_common.h index 9768066b..3f9e1b8c 100644 --- a/oslib/libmtd_common.h +++ b/oslib/libmtd_common.h @@ -119,20 +119,11 @@ extern "C" { fprintf(stderr, "%s: warning!: " fmt "\n", PROGRAM_NAME, ##__VA_ARGS__); \ } while(0) -#if defined(__UCLIBC__) -/* uClibc versions before 0.9.34 don't have rpmatch() */ -#if __UCLIBC_MAJOR__ == 0 && \ - (__UCLIBC_MINOR__ < 9 || \ - (__UCLIBC_MINOR__ == 9 && __UCLIBC_SUBLEVEL__ < 34)) -#undef rpmatch -#define rpmatch __rpmatch -static inline int __rpmatch(const char *resp) +static inline int mtd_rpmatch(const char *resp) { return (resp[0] == 'y' || resp[0] == 'Y') ? 1 : (resp[0] == 'n' || resp[0] == 'N') ? 0 : -1; } -#endif -#endif /** * prompt the user for confirmation @@ -154,7 +145,7 @@ static inline bool prompt(const char *msg, bool def) } if (strcmp("\n", line) != 0) { - switch (rpmatch(line)) { + switch (mtd_rpmatch(line)) { case 0: ret = false; break; case 1: ret = true; break; case -1: