@@ -5,6 +5,9 @@ use std::marker::PhantomData;
55#[ cfg( not( target_os = "linux" ) ) ]
66use raw_window_handle:: HasRawWindowHandle ;
77
8+ #[ cfg( not( target_os = "freebsd" ) ) ]
9+ use raw_window_handle:: HasRawWindowHandle ;
10+
811#[ cfg( target_os = "windows" ) ]
912mod win;
1013#[ cfg( target_os = "windows" ) ]
@@ -16,6 +19,11 @@ pub(crate) mod x11;
1619#[ cfg( target_os = "linux" ) ]
1720pub ( crate ) use self :: x11 as platform;
1821
22+ #[ cfg( target_os = "freebsd" ) ]
23+ pub ( crate ) mod x11;
24+ #[ cfg( target_os = "freebsd" ) ]
25+ pub ( crate ) use self :: x11 as platform;
26+
1927#[ cfg( target_os = "macos" ) ]
2028mod macos;
2129#[ cfg( target_os = "macos" ) ]
@@ -75,7 +83,7 @@ pub struct GlContext {
7583}
7684
7785impl GlContext {
78- #[ cfg( not( target_os = "linux" ) ) ]
86+ #[ cfg( not( any ( target_os = "linux" , target_os = "freebsd" ) ) ) ]
7987 pub ( crate ) unsafe fn create (
8088 parent : & impl HasRawWindowHandle , config : GlConfig ,
8189 ) -> Result < GlContext , GlError > {
@@ -86,7 +94,7 @@ impl GlContext {
8694 /// The X11 version needs to be set up in a different way compared to the Windows and macOS
8795 /// versions. So the platform-specific versions should be used to construct the context within
8896 /// baseview, and then this object can be passed to the user.
89- #[ cfg( target_os = "linux" ) ]
97+ #[ cfg( any ( target_os = "linux" , target_os = "freebsd" ) ) ]
9098 pub ( crate ) fn new ( context : platform:: GlContext ) -> GlContext {
9199 GlContext { context, phantom : PhantomData }
92100 }
0 commit comments