Upstream: Yes, https://github.com/rpm-software-management/rpm/pull/1379
Reason: Fixes compilation with musl

diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 4c10156..7318763 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -8,6 +8,7 @@
 #include <utime.h>
 #include <errno.h>
 #include <dirent.h>
+#include <fcntl.h>
 
 #ifndef	DYING	/* XXX already in "system.h" */
 #include <fnmatch.h>