about summary refs log tree commit diff
path: root/shared/nm-std-aux
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2021-08-16 09:52:58 +0200
committerMichael Biebl <biebl@debian.org>2021-08-16 09:52:58 +0200
commit4e636b195bda344f34514ebb1a855f99b004164b (patch)
tree8992a936f0a115aa3c60fe5cf8845085aab31f08 /shared/nm-std-aux
parentfac255a528d295b515fdb7867aac5cab8c6f823f (diff)
parentbfe522304da217296e2a61040f58e35ec5d6f3f2 (diff)
Update upstream source from tag 'upstream/1.30.6'
Update to upstream version '1.30.6'
with Debian dir b4583b68cbcf2c2cc2b9687a460901d0ed5f7e42
Diffstat (limited to 'shared/nm-std-aux')
-rw-r--r--shared/nm-std-aux/nm-std-aux.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/shared/nm-std-aux/nm-std-aux.h b/shared/nm-std-aux/nm-std-aux.h
index 30adeb58..a619cebd 100644
--- a/shared/nm-std-aux/nm-std-aux.h
+++ b/shared/nm-std-aux/nm-std-aux.h
@@ -695,6 +695,14 @@ nm_close(int fd)
 NM_AUTO_DEFINE_FCN_VOID0(void *, _nm_auto_free_impl, free);
 #define nm_auto_free nm_auto(_nm_auto_free_impl)
 
+static inline void
+_nm_auto_protect_errno(const int *p_saved_errno)
+{
+    errno = *p_saved_errno;
+}
+#define NM_AUTO_PROTECT_ERRNO(errsv_saved) \
+    nm_auto(_nm_auto_protect_errno) _nm_unused const int errsv_saved = (errno)
+
 /*****************************************************************************/
 
 static inline void