mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +00:00
f56b772b29
This commit updates `dosbox-staging` to the latest stable version and removes patches that are no longer needed for successful compilation/usage.
43 lines
1.4 KiB
Diff
43 lines
1.4 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Gunnar Beutner <gbeutner@serenityos.org>
|
|
Date: Fri, 18 Jun 2021 15:06:37 +0200
|
|
Subject: [PATCH] Skip use of glob() in serenity
|
|
|
|
We don't have that yet.
|
|
---
|
|
src/misc/fs_utils_posix.cpp | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/src/misc/fs_utils_posix.cpp b/src/misc/fs_utils_posix.cpp
|
|
index eaa24f95446652ad7860b23b9779f29c9b10c104..2f9a5300bb95d3d3db93672824a640aff0a44cd2 100644
|
|
--- a/src/misc/fs_utils_posix.cpp
|
|
+++ b/src/misc/fs_utils_posix.cpp
|
|
@@ -24,7 +24,9 @@
|
|
|
|
#include <cerrno>
|
|
#include <cctype>
|
|
+#ifndef __serenity__
|
|
#include <glob.h>
|
|
+#endif
|
|
#include <sys/stat.h>
|
|
#include <sys/types.h>
|
|
#include <unistd.h>
|
|
@@ -75,6 +77,7 @@ std::string to_native_path(const std::string &path) noexcept
|
|
// glob(3) sorts by default, so if more than one path will match
|
|
// the pattern, return the first one (in alphabetic order) that matches.
|
|
const std::string pattern = translate_to_glob_pattern(path);
|
|
+#ifndef __serenity__
|
|
glob_t pglob;
|
|
const int err = glob(pattern.c_str(), GLOB_TILDE, nullptr, &pglob);
|
|
if (err == GLOB_NOMATCH) {
|
|
@@ -96,6 +99,9 @@ std::string to_native_path(const std::string &path) noexcept
|
|
const std::string ret = pglob.gl_pathv[0];
|
|
globfree(&pglob);
|
|
return ret;
|
|
+#else
|
|
+ return path;
|
|
+#endif
|
|
}
|
|
|
|
int create_dir(const char *path, uint32_t mode, uint32_t flags) noexcept
|