alsa/0074-do-not-set-close-on-exec-flag-on-descriptor-if-it-wa.patch
Takashi Iwai 0fcb2a0c4b Accepting request 774837 from home:tiwai:branches:multimedia:libs
- Backport upstream fixes:
  ucm-parser fixes and enhancements, configure script cleanup,
  fixes of 5.6 kernel ABI, O_CLOEXEC flag fix:
  0064-ucm-parser-cosmetic-fixes-in-the-comments.patch
  0065-configure.ac-remove-an-unnecessary-libtool-fix.patch
  0066-ucm-parser-use-correct-filename-in-parser_master_fil.patch
  0067-ucm-the-ucm2-subdirectory-is-driver-name-based.patch
  0068-ucm-implement-RenameDevice-and-RemoveDevice-verb-man.patch
  0069-ucm-fill-missing-device-entries-conflicting-supporte.patch
  0070-control-Remove-access-to-the-deprecated-dimen-fields.patch
  0071-topology-Drop-SNDRV_CTL_ELEM_ACCESS_TIMESTAMP-access.patch
  0072-uapi-Sync-with-5.6-kernel-ABI.patch
  0073-ucm-parser-add-error-message-to-verb_dev_list_add.patch
  0074-do-not-set-close-on-exec-flag-on-descriptor-if-it-wa.patch

OBS-URL: https://build.opensuse.org/request/show/774837
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/alsa?expand=0&rev=267
2020-02-17 11:44:38 +00:00

33 lines
835 B
Diff

From b367274b4dcdd1e83e6e7211dd2c08df05c8a998 Mon Sep 17 00:00:00 2001
From: Rolf Eike Beer <eb@emlix.com>
Date: Tue, 11 Feb 2020 11:22:18 +0100
Subject: [PATCH 74/74] do not set close-on-exec flag on descriptor if it was
already set
There is no need to set this again if O_CLOEXEC is supported.
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
---
include/local.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/local.h b/include/local.h
index ea0ec32d96b3..ed6ba93664dd 100644
--- a/include/local.h
+++ b/include/local.h
@@ -320,8 +320,10 @@ static inline int snd_open_device(const char *filename, int fmode)
fd = rsm_open_device(filename, fmode);
}
#endif
+#ifndef O_CLOEXEC
if (fd >= 0)
fcntl(fd, F_SETFD, FD_CLOEXEC);
+#endif
return fd;
}
--
2.16.4