From 4e3c1930170de973f300a14c4a3d2e8a95c93a93 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Mon, 10 Mar 2014 17:32:04 +0100 Subject: gsm/a5.c: Compile on OS which don't have ENOTSUP --- src/gsm/a5.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/gsm/a5.c b/src/gsm/a5.c index de821e89..1be4ef89 100644 --- a/src/gsm/a5.c +++ b/src/gsm/a5.c @@ -39,6 +39,12 @@ #include +/* Some OS like Nuttx don't define ENOTSUP */ +#ifndef ENOTSUP +#define __LOCAL_ENOTSUP +#define ENOTSUP 1 +#endif + /*! \brief Main method to generate a A5/x cipher stream * \param[in] n Which A5/x method to use * \param[in] key 8 byte array for the key (as received from the SIM) @@ -78,6 +84,10 @@ osmo_a5(int n, const uint8_t *key, uint32_t fn, ubit_t *dl, ubit_t *ul) return 0; } +#ifdef __LOCAL_ENOTSUP +#undef ENOTSUP +#endif + /* ------------------------------------------------------------------------ */ /* A5/1&2 common stuff */ -- cgit v1.2.3