diff --git a/src/add-ons/input_server/devices/keyboard/Jamfile b/src/add-ons/input_server/devices/keyboard/Jamfile
index e8c6d89abc..459d7450fa 100644
--- a/src/add-ons/input_server/devices/keyboard/Jamfile
+++ b/src/add-ons/input_server/devices/keyboard/Jamfile
@@ -8,3 +8,8 @@ Addon keyboard : input_server/devices :
: false
: be input_server ;
+if $(COMPILE_FOR_R5) {
+} else {
+ LinkSharedOSLibs keyboard : libopenbeos.so ;
+}
+