summaryrefslogtreecommitdiffhomepage
path: root/libbb/speed_table.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2014-01-08 15:25:20 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2014-01-08 15:25:20 +0100
commit96f92a1afac1599cc5f6128e7e9a43bdab220bc8 (patch)
treeed5f9d72b52b77ec8e6757e208eee2bef09e330b /libbb/speed_table.c
parent8e0ad2647a9725f189ad880b437619667e81343c (diff)
libbb: FreeBSD fix for B<num> baud rate constants not fitting into a short.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb/speed_table.c')
-rw-r--r--libbb/speed_table.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbb/speed_table.c b/libbb/speed_table.c
index 45159f1f3..174d531b2 100644
--- a/libbb/speed_table.c
+++ b/libbb/speed_table.c
@@ -10,7 +10,12 @@
#include "libbb.h"
struct speed_map {
+#if defined __FreeBSD__
+ /* On FreeBSD, B<num> constants don't fit into a short */
+ unsigned speed;
+#else
unsigned short speed;
+#endif
unsigned short value;
};