--- rpython/rlib/rposix.py.orig	2025-02-22 16:54:09 UTC
+++ rpython/rlib/rposix.py
@@ -212,6 +212,8 @@ else:
         includes.append('sys/sysmacros.h')
     if sys.platform.startswith('freebsd') or sys.platform.startswith('openbsd'):
         includes.append('sys/ttycom.h')
+    if sys.platform.startswith('freebsd'):
+        includes.append('termios.h')
     libraries = ['util']
 
 eci = ExternalCompilationInfo(
