diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index dd3640e6a87dd0740d592a66a5e40a0f833a141a..92c9e7fca33ed1ffa7eb69bbb4143c5ad2d1e431 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -4322,7 +4322,14 @@ (define-public rdma-core
        ;; to do the same for consistency. They also recommend using the
        ;; "Release" build type.
        #:build-type "Release"
-       #:configure-flags (list "-GNinja")
+       #:configure-flags (list "-GNinja"
+
+                               ;; On some configurations, the
+                               ;; IB_USER_MAD_REGISTER_AGENT ioctl, which is
+                               ;; used by default, would return ENODEV.  To
+                               ;; avoid that, use 'write' instead of ioctls,
+                               ;; as suggested in 'CMakeList.txt'.
+                               "-DIOCTL_MODE=write")
        #:phases
        (modify-phases %standard-phases
          (replace 'build