[v3,1/2] newlib/libc/include/devctl.h: Add extern "C" wrapper

Message ID 1582121021-30727-2-git-send-email-joel@rtems.org
State New
Headers show
Series
  • Misc Patches
Related show

Commit Message

Joel Sherrill Feb. 19, 2020, 2:03 p.m.
Adding this was necessary to allow posix_devctl() from C++.
---
 newlib/libc/include/devctl.h | 8 ++++++++
 1 file changed, 8 insertions(+)

-- 
1.8.3.1

Comments

Corinna Vinschen Feb. 20, 2020, 8:49 a.m. | #1
On Feb 19 08:03, Joel Sherrill wrote:
> Adding this was necessary to allow posix_devctl() from C++.

> ---

>  newlib/libc/include/devctl.h | 8 ++++++++

>  1 file changed, 8 insertions(+)

> 

> diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h

> index fd3409f..889693e 100644

> --- a/newlib/libc/include/devctl.h

> +++ b/newlib/libc/include/devctl.h

> @@ -35,6 +35,10 @@

>  

>  #include <sys/cdefs.h>

>  

> +#ifdef __cplusplus

> +extern "C" {

> +#endif

> +

>  #if defined(__rtems__)

>  /*

>   * The FACE Technical Standard, Edition 3.0 and later require the

> @@ -67,4 +71,8 @@ int posix_devctl(

>  );

>  #endif

>  

> +#ifdef __cplusplus

> +}

> +#endif

> +

>  #endif

> -- 

> 1.8.3.1


Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Patch

diff --git a/newlib/libc/include/devctl.h b/newlib/libc/include/devctl.h
index fd3409f..889693e 100644
--- a/newlib/libc/include/devctl.h
+++ b/newlib/libc/include/devctl.h
@@ -35,6 +35,10 @@ 
 
 #include <sys/cdefs.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #if defined(__rtems__)
 /*
  * The FACE Technical Standard, Edition 3.0 and later require the
@@ -67,4 +71,8 @@  int posix_devctl(
 );
 #endif
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif