aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2014-03-10 17:32:04 +0100
committerHarald Welte <laforge@gnumonks.org>2014-03-10 17:32:04 +0100
commit4e3c1930170de973f300a14c4a3d2e8a95c93a93 (patch)
treef851405688b793997c84d53e6f3207f1dcc857bc
parent13ed7b477c6a281f97cd87dcdc6845b284afa5c7 (diff)
gsm/a5.c: Compile on OS which don't have ENOTSUP
-rw-r--r--src/gsm/a5.c10
1 files changed, 10 insertions, 0 deletions
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 <osmocom/gsm/a5.h>
+/* 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 */