pkgsrc/devel/xulrunner17/patches/patch-toolkit_components_osfile_osfileutils.cpp
ryoon 27af90c8a6 Import xulrunner17-17.0.2 as devel/xulrunner17.
XULRunner is a runtime environment for applications using the
XML User Interface Language, XUL. It is the successor of the "Gecko"
runtime environment.

This package tracks 17.0.x extended support release.
2013-01-10 16:17:09 +00:00

47 lines
1.1 KiB
C++

$NetBSD: patch-toolkit_components_osfile_osfileutils.cpp,v 1.1 2013/01/10 16:17:11 ryoon Exp $
http://gnats.netbsd.org/47233
--- toolkit/components/osfile/osfileutils.cpp.orig 2012-11-19 15:43:22.000000000 +0000
+++ toolkit/components/osfile/osfileutils.cpp
@@ -7,6 +7,10 @@
#include "nsCOMPtr.h"
#include "nsCRTGlue.h"
+#if defined (__DragonFly__)
+#include <sys/param.h>
+#endif
+
// Utilities for handling errors
namespace {
@@ -48,7 +52,9 @@ void error_no_memory() {
* the last operation failed because it is not supported.
*/
void error_not_supported() {
+#if !(defined(__DragonFly_version) && (__DragonFly_version < 300301))
errno = ENOTSUP;
+#endif
}
/**
@@ -57,7 +63,9 @@ void error_not_supported() {
* argument.
*/
void error_invalid_argument() {
+#if !(defined(__DragonFly_version) && (__DragonFly_version < 300301))
errno = EINVAL;
+#endif
}
/**
@@ -66,7 +74,9 @@ void error_invalid_argument() {
* memory.
*/
void error_no_memory() {
+#if !(defined(__DragonFly_version) && (__DragonFly_version < 300301))
errno = ENOMEM;
+#endif
}
#endif // defined(XP_WIN)