Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
junhui93
packages
提交
fa96401f
P
packages
项目概览
junhui93
/
packages
10 个月 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
packages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
fa96401f
编写于
6月 17, 2023
作者:
C
coolsnowwolf
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
open-vm-tools: bump verison
上级
999b2eec
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
85 addition
and
441 deletion
+85
-441
utils/open-vm-tools/Makefile
utils/open-vm-tools/Makefile
+11
-17
utils/open-vm-tools/files/telinit
utils/open-vm-tools/files/telinit
+0
-4
utils/open-vm-tools/files/tools.conf
utils/open-vm-tools/files/tools.conf
+0
-7
utils/open-vm-tools/patches/0001-werror.patch
utils/open-vm-tools/patches/0001-werror.patch
+0
-34
utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch
...patches/0003-Use-configure-test-for-struct-timespec.patch
+1
-15
utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
...hes/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
+0
-24
utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
...se-configure-to-test-for-feature-instead-of-platfor.patch
+2
-41
utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch
...ches/0006-Use-configure-test-for-sys-stat.h-include.patch
+0
-12
utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
...en-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
+0
-18
utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch
...0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch
+8
-31
utils/open-vm-tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch
...tools/patches/0011-Use-off64_t-instead-of-__off64_t.patch
+11
-0
utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch
...pen-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch
+7
-96
utils/open-vm-tools/patches/0015-i386-time.patch
utils/open-vm-tools/patches/0015-i386-time.patch
+0
-73
utils/open-vm-tools/patches/010-musl-120.patch
utils/open-vm-tools/patches/010-musl-120.patch
+35
-0
utils/open-vm-tools/patches/010-warnings.patch
utils/open-vm-tools/patches/010-warnings.patch
+0
-69
utils/open-vm-tools/patches/020-no-werror.patch
utils/open-vm-tools/patches/020-no-werror.patch
+10
-0
未找到文件。
utils/open-vm-tools/Makefile
浏览文件 @
fa96401f
...
...
@@ -8,13 +8,13 @@
include
$(TOPDIR)/rules.mk
PKG_NAME
:=
open-vm-tools
PKG_VERSION
:=
1
2.0
.0
PKG_RELEASE
:=
$(AUTORELEASE)
PKG_VERSION
:=
1
1.3
.0
PKG_RELEASE
:=
1
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
-1
9345655
.tar.gz
PKG_SOURCE
:=
$(PKG_NAME)
-
$(PKG_VERSION)
-1
8090558
.tar.gz
PKG_SOURCE_URL
:=
https://github.com/vmware/open-vm-tools/releases/download/stable-
$(PKG_VERSION)
PKG_HASH
:=
ea370217a213802f91b01231e28298bbe54134822351fb5cc70255d80ba0e775
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
-
$(PKG_VERSION)
-1
9345655
PKG_HASH
:=
9bad3ee755340853bf7990e92f3d3880959a73e0749e8aaae62730854368bd2c
PKG_BUILD_DIR
:=
$(BUILD_DIR)
/
$(PKG_NAME)
-
$(PKG_VERSION)
-1
8090558
PKG_LICENSE
:=
LGPL-2.1-or-later
PKG_LICENSE_FILES
:=
LICENSE
...
...
@@ -35,12 +35,7 @@ endef
define
Package/open-vm-tools
$(call
Package/open-vm-tools/Default)
DEPENDS
:=
@TARGET_x86
\
+glib2
\
+libpthread
\
+libtirpc
\
+libmspack
\
+libdnet
DEPENDS
:=
@TARGET_x86 +glib2 +libpthread +libtirpc
TITLE
:=
open-vm-tools
URL
:=
https://github.com/vmware/open-vm-tools
MAINTAINER
:=
Yuhei OKAWA <tochiro.srchack@gmail.com>
...
...
@@ -52,7 +47,7 @@ endef
define
Package/open-vm-tools-fuse
$(call
Package/open-vm-tools/Default)
DEPENDS
:=
+open-vm-tools +libfuse
3
DEPENDS
:=
+open-vm-tools +libfuse
TITLE
:=
open-vm-tools-fuse
MAINTAINER
:=
Kagurazaka Kotori <kagurazakakotori@gmail.com>
endef
...
...
@@ -63,7 +58,6 @@ endef
CONFIGURE_ARGS
+=
\
--without-icu
\
--disable-containerinfo
\
--disable-multimon
\
--disable-docs
\
--disable-tests
\
...
...
@@ -73,8 +67,10 @@ CONFIGURE_ARGS+= \
--without-pam
\
--disable-grabbitmqproxy
\
--disable-vgauth
\
--disable-deploypkg
\
--without-root-privileges
\
--without-kernel-modules
\
--without-dnet
\
--with-tirpc
\
--without-x
\
--without-gtk2
\
...
...
@@ -82,7 +78,7 @@ CONFIGURE_ARGS+= \
--without-xerces
\
--enable-resolutionkms
=
no
TARGET_LDFLAGS
+=
$(
if
$(ICONV_FULL)
,-liconv
)
TARGET_LDFLAGS
+=
-liconv
define
Build/Prepare
$(call
Build/Prepare/Default)
...
...
@@ -107,14 +103,13 @@ define Package/open-vm-tools/install
$(INSTALL_BIN)
$(PKG_INSTALL_DIR)/usr/bin/vmware-xferlogs
$(1)/bin/
$(INSTALL_DIR)
$(1)/sbin/
$(INSTALL_BIN)
$(PKG_INSTALL_DIR)/usr/sbin/mount.vmhgfs
$(1)/sbin/
$(INSTALL_BIN)
./files/shutdown
$(1)/sbin/
$(INSTALL_BIN)
./files/telinit
$(1)/sbin/
$(INSTALL_DIR)
$(1)/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libguestlib.so*
$(1)/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libhgfs.so*
$(1)/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libvmtools.so*
$(1)/lib/
$(CP)
$(PKG_INSTALL_DIR)/usr/lib/libDeployPkg.so*
$(1)/lib/
$(INSTALL_DIR)
$(1)/usr/lib/open-vm-tools/plugins/common/
$(INSTALL_DATA)
$(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/common/libhgfsServer.so
$(1)/usr/lib/open-vm-tools/plugins/common/
...
...
@@ -125,7 +120,6 @@ define Package/open-vm-tools/install
$(INSTALL_DATA)
$(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libpowerOps.so
$(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA)
$(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libtimeSync.so
$(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA)
$(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libvmbackup.so
$(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DATA)
$(PKG_INSTALL_DIR)/usr/lib/open-vm-tools/plugins/vmsvc/libdeployPkgPlugin.so
$(1)/usr/lib/open-vm-tools/plugins/vmsvc/
$(INSTALL_DIR)
$(1)/etc/hotplug.d/block/
$(INSTALL_BIN)
./files/vmware-scsi.hotplug
$(1)/etc/hotplug.d/block/80-vmware-scsi
...
...
utils/open-vm-tools/files/telinit
已删除
100644 → 0
浏览文件 @
999b2eec
#!/bin/sh
#compatibility script for traditional customization
/sbin/reboot
utils/open-vm-tools/files/tools.conf
浏览文件 @
fa96401f
[
guestinfo
]
disable
-
perf
-
mon
=
1
[
logging
]
log
=
true
vmtoolsd
.
level
=
debug
vmsvc
.
level
=
debug
vmusr
.
level
=
debug
toolboxcmd
.
level
=
debug
utils/open-vm-tools/patches/0001-werror.patch
已删除
100644 → 0
浏览文件 @
999b2eec
From 9a260723b615dc2e5c6c72767656f9397f59eecf Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Thu, 5 Nov 2015 13:19:20 +0000
Subject: [PATCH] open-vm-tools: Add --disable-werror configure option
Packagers will normally not want the -Werror compile option as it may
break compilation depending on the platform specific warnings.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
configure.ac | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/configure.ac
+++ b/configure.ac
@@ -1451,7 +1451,17 @@
AC_C_VOLATILE
### General flags / actions
CFLAGS="$CFLAGS -Wall"
-CFLAGS="$CFLAGS -Werror"
+AC_ARG_ENABLE(
+ werror,
+ AS_HELP_STRING(
+ [--disable-werror],
+ [disable compilation with -Werror]),
+ [enable_werror="$enableval"],
+ [enable_werror="yes"])
+
+if test "$enable_werror" = "yes"; then
+ CFLAGS="$CFLAGS -Werror"
+fi
# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
# in Xlib.h on OpenSolaris.
utils/open-vm-tools/patches/0003-Use-configure-test-for-struct-timespec.patch
浏览文件 @
fa96401f
From f587e80663afed5d189f2dd185dea7e4b2bbb105 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:03:00 +0000
Subject: [PATCH] Use configure test for struct timespec
Use the configure script to test for struct time spec instead of trying
to keep track of what platforms has it.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
configure.ac | 1 +
lib/include/hgfsUtil.h | 8 +-------
2 files changed, 2 insertions(+), 7 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -1
441,6 +1441
,7 @@
AC_TYPE_OFF_T
@@ -1
212,6 +1212
,7 @@
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
...
...
utils/open-vm-tools/patches/0004-Fix-definition-of-ALLPERMS-and-ACCESSPERMS.patch
浏览文件 @
fa96401f
From 81da70dccfd03e6089be9ec509e43e697b8a58b3 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 09:10:14 +0000
Subject: [PATCH] Fix definition of ALLPERMS and ACCESSPERMS
The ALLPERMS and ACCESSPERMS defines are not specified in POSIX so
assume it is not there instead of testing for specific implementations.
This is needed for musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
lib/hgfsServer/hgfsServerLinux.c | 8 +++++---
services/plugins/dndcp/dnd/dndLinux.c | 3 +--
2 files changed, 6 insertions(+), 5 deletions(-)
--- a/lib/hgfsServer/hgfsServerLinux.c
+++ b/lib/hgfsServer/hgfsServerLinux.c
@@ -105,11 +105,13 @@
typedef struct DirectoryEntry {
...
...
@@ -44,11 +28,3 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
#endif
#ifdef __ANDROID__
@@ -62,7 +62,6 @@
*/
#define NO_SETMNTENT
#define NO_ENDMNTENT
-#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
#endif
utils/open-vm-tools/patches/0005-Use-configure-to-test-for-feature-instead-of-platfor.patch
浏览文件 @
fa96401f
From da7d7951c3b4f11485accf54e8e925c04709ed78 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 10:05:07 +0000
Subject: [PATCH] Use configure to test for feature instead of platform
Test for various functions instead of trying to keep track of what
platform and what version of the given platform has support for what.
This should make it easier to port to currently unknown platforms and
will solve the issue if a platform add support for a missing feature in
the future.
The features we test for are:
- getifaddrs
- getauxval
- issetugid
- __secure_getenv
This is needed for musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
configure.ac | 4 ++++
lib/misc/idLinux.c | 30 +++++++++++-------------
lib/nicInfo/nicInfoPosix.c | 11 +++++----
3 files changed, 24 insertions(+), 21 deletions(-)
--- a/configure.ac
+++ b/configure.ac
@@ -
1169,6 +1169
,7 @@
AC_CHECK_FUNCS(
@@ -
940,6 +940
,7 @@
AC_CHECK_FUNCS(
AC_CHECK_FUNCS([ecvt])
AC_CHECK_FUNCS([fcvt])
...
...
@@ -35,7 +8,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
AC_CHECK_FUNC([mkdtemp], [have_mkdtemp=yes])
@@ -1
378,10 +1379
,13 @@
fi
@@ -1
149,10 +1150
,13 @@
fi
###
AC_CHECK_HEADERS([crypt.h])
...
...
@@ -127,15 +100,3 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
# include <net/if.h>
#endif
#ifndef NO_DNET
@@ -499,10 +503,7 @@
GuestInfoGetNicInfo(unsigned int maxIPv4
*
******************************************************************************
*/
-#if defined(__FreeBSD__) || \
- defined(__APPLE__) || \
- defined(USERWORLD) || \
- (defined(__linux__) && defined(NO_DNET))
+#if defined(NO_DNET) && defined(HAVE_GETIFADDRS)
char *
GuestInfoGetPrimaryIP(void)
utils/open-vm-tools/patches/0006-Use-configure-test-for-sys-stat.h-include.patch
浏览文件 @
fa96401f
From 716d1d77bf8199e694c71edcb9e0144d74ba7977 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 18 Nov 2015 10:41:01 +0000
Subject: [PATCH] Use configure test for sys/stat.h include
This is needed for musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
services/plugins/vix/vixTools.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/services/plugins/vix/vixTools.c
+++ b/services/plugins/vix/vixTools.c
@@ -66,7 +66,7 @@
...
...
utils/open-vm-tools/patches/0008-Rename-poll.h-to-vm_poll.h.patch
浏览文件 @
fa96401f
From 5b45a812a5a3e9509021043f83529cccc13af26a Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 17 Nov 2015 10:57:31 +0000
Subject: [PATCH] Rename poll.h to vm_poll.h
musl libc's system headers pulls in open-vm-tools' poll.h. To avoid this
we rename poll.h to vm_poll.h.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
lib/asyncsocket/asyncsocket.c | 2 +-
lib/hgfsServer/hgfsServer.c | 2 +-
lib/include/asyncsocket.h | 2 +-
lib/include/pollImpl.h | 2 +-
lib/include/{poll.h => vm_poll.h} | 0
lib/rpcIn/rpcin.c | 2 +-
6 files changed, 5 insertions(+), 5 deletions(-)
--- a/lib/asyncsocket/asyncsocket.c
+++ b/lib/asyncsocket/asyncsocket.c
@@ -87,7 +87,7 @@
...
...
utils/open-vm-tools/patches/0009-use-posix-strerror_r-unless-on-gnu-libc-system.patch
浏览文件 @
fa96401f
From 42caf4814d8b7dfe21d55012597d81f98fb5cf01 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 2 Jan 2017 14:39:27 +0000
Subject: [PATCH] use posix strerror_r unless gnu
---
lib/err/errPosix.c | 8 +++++---
vgauth/common/VGAuthLog.c | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
--- a/lib/err/errPosix.c
+++ b/lib/err/errPosix.c
@@ -63,11 +63,13 @@
ErrErrno2String(Err_Number errorNumber,
@@ -61,13 +61,7 @@
ErrErrno2String(Err_Number errorNumber,
char *buf, // OUT: return buffer
size_t bufSize) // IN: size of buffer
{
char *p;
-
char *p;
-
-#if defined(__linux__) && !defined(__ANDROID__)
+#if defined(__GLIBC__)
p = strerror_r(errorNumber, buf, bufSize);
#else
- p = strerror_r(errorNumber, buf, bufSize);
-#else
- p = strerror(errorNumber);
-#endif
+ if (strerror_r(errorNumber, buf, bufSize) != 0)
+ snprintf(buf, bufSize, "unknown error %i", errorNumber);
+ p = buf;
+#endif /* defined __GLIBC__ */
+ char *p = strerror(errorNumber);
ASSERT(p != NULL);
return p;
}
--- a/vgauth/common/VGAuthLog.c
+++ b/vgauth/common/VGAuthLog.c
@@ -210,7 +210,7 @@
LogErrorPosixCodeV(int code,
g_vsnprintf(buf, sizeof buf, fmt, args);
buf[sizeof buf - 1] = '\0';
-#ifdef sun
+#if !defined(__GLIBC__)
strerror_r(code, errMsg, sizeof errMsg);
g_warning("[function %s, file %s, line %d], %s, [errno = %d], %s\n",
func, file, line, buf, code, errMsg);
utils/open-vm-tools/patches/00
02-
off64_t.patch
→
utils/open-vm-tools/patches/00
11-Use-off64_t-instead-of-__
off64_t.patch
浏览文件 @
fa96401f
From 3d6dad8c9202f449bbdff90da5463c1994198883 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 17 Nov 2015 10:39:01 +0000
Subject: [PATCH] Do not assume that linux and gnu libc are the same thing
Use __GLIBC__ when testing for GNU libc specific things instead of
assuming that __linux__ is GNU libc.
This is needed for building with musl libc.
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
---
lib/file/fileIOPosix.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/lib/file/fileIOPosix.c
+++ b/lib/file/fileIOPosix.c
@@ -198,7 +198,7 @@
static AlignedPool alignedPool;
...
...
@@ -20,7 +5,7 @@ Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
*/
-#if defined(__linux__) && !defined(__ANDROID__)
+#if
defined(__linux__) && defined(__GLIBC__)
+#if
0
#if defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)
/*
* We want preadv/pwritev. But due to FOB=64, the symbols are -64.
utils/open-vm-tools/patches/0013-fsutil_use_typedef_loff_t.patch
浏览文件 @
fa96401f
From cf21ccdef4fe5e749fc10403afc3d9340a6d10dd Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Mon, 2 Jan 2017 15:25:32 +0000
Subject: [PATCH] use off64_t instead of loff_t
---
vmhgfs-fuse/file.c | 12 ++++++------
vmhgfs-fuse/fsutil.c | 2 +-
vmhgfs-fuse/fsutil.h | 8 ++------
3 files changed, 9 insertions(+), 13 deletions(-)
--- a/vmhgfs-fuse/file.c
+++ b/vmhgfs-fuse/file.c
@@ -547,7 +547,7 @@
static int
HgfsDoRead(HgfsHandle handle, // IN: Handle for this file
char *buf, // OUT: Buffer to copy data into
size_t count, // IN: Number of bytes to read
- loff_t offset) // IN: Offset at which to read
+ off64_t offset) // IN: Offset at which to read
{
HgfsReq *req;
HgfsOp opUsed;
@@ -708,11 +708,11 @@
ssize_t
HgfsRead(struct fuse_file_info *fi, // IN: File info struct
char *buf, // OUT: User buffer to copy data into
size_t count, // IN: Number of bytes to read
- loff_t offset) // IN: Offset at which to read
+ off64_t offset) // IN: Offset at which to read
{
int result = 0;
char *buffer = buf;
- loff_t curOffset = offset;
+ off64_t curOffset = offset;
size_t nextCount, remainingCount = count;
uint32 maxIOSize = HgfsMaxIOSize();
@@ -769,7 +769,7 @@
static int
HgfsDoWrite(HgfsHandle handle, // IN: Handle for the file
const char *buf, // IN: Buffer containing data
size_t count, // IN: Number of bytes to write
- loff_t offset) // IN: Offset to begin writing at
+ off64_t offset) // IN: Offset to begin writing at
{
HgfsReq *req;
int result = 0;
@@ -893,11 +893,11 @@
ssize_t
HgfsWrite(struct fuse_file_info *fi, // IN: File info structure
const char *buf, // OUT: User buffer to copy data into
size_t count, // IN: Number of bytes to read
- loff_t offset) // IN: Offset at which to read
+ off64_t offset) // IN: Offset at which to read
{
int result;
const char *buffer = buf;
- loff_t curOffset = offset;
+ off64_t curOffset = offset;
size_t nextCount, remainingCount = count;
ssize_t bytesWritten = 0;
uint32 maxIOSize = HgfsMaxIOSize();
--- a/vmhgfs-fuse/fsutil.c
+++ b/vmhgfs-fuse/fsutil.c
@@ -694,7 +694,7 @@
HgfsStatusConvertToLinux(HgfsStatus hgfs
unsigned long
HgfsCalcBlockSize(uint64 tsize)
{
- loff_t used = (tsize + 511) >> 9;
+ off64_t used = (tsize + 511) >> 9;
return (used > ULONG_MAX) ? ULONG_MAX : used;
}
--- a/vmhgfs-fuse/fsutil.h
+++ b/vmhgfs-fuse/fsutil.h
@@ -32,10 +32,6 @@
@@ -29,6 +29,9 @@
#include "request.h"
#include "vm_basic_types.h"
+#ifndef _GNU_SOURCE
+#define _GNU_SOURCE
+#endif
#include "hgfsProto.h"
#include <fuse.h>
-#if defined(__FreeBSD__) || defined(__SOLARIS__) || defined(__APPLE__)
-typedef long long loff_t;
-#endif
-
/*
* Struct used to pass around attributes.
* These aren't just the attributes seen in HgfsAttr[V2]; we add a filename
@@ -73,7 +69,7 @@
ssize_t
HgfsWrite(struct fuse_file_info *fi,
const char *buf,
size_t count,
- loff_t offset);
+ off64_t offset);
int
HgfsRename(const char* from, const char* to);
@@ -93,7 +89,7 @@
ssize_t
HgfsRead(struct fuse_file_info *fi,
char *buf,
size_t count,
- loff_t offset);
+ off64_t offset);
int
HgfsSetattr(const char* path,
utils/open-vm-tools/patches/0015-i386-time.patch
已删除
100644 → 0
浏览文件 @
999b2eec
From 3f0580f2546de8be7acf1bc78a55a257bc638ebe Mon Sep 17 00:00:00 2001
From: Bartosz Brachaczek <b.brachaczek@gmail.com>
Date: Tue, 12 Nov 2019 14:31:08 +0100
Subject: [PATCH] Make HgfsConvertFromNtTimeNsec aware of 64-bit time_t on i386
I verified that this function behaves as expected on x86_64, i386 with
32-bit time_t, and i386 with 64-bit time_t for the following values of
ntTtime:
UNIX_EPOCH-1, UNIX_EPOCH, UNIX_EPOCH+1, UNIX_S32_MAX-1, UNIX_S32_MAX,
UNIX_S32_MAX+1, UNIX_S32_MAX*2+1
I did not verify whether the use of Div643264 is optimal, performance
wise.
---
lib/hgfs/hgfsUtil.c | 34 +++++++++++++++++--------------
1 file changed, 19 insertions(+), 15 deletions(-)
--- a/lib/hgfs/hgfsUtil.c
+++ b/lib/hgfs/hgfsUtil.c
@@ -110,23 +110,21 @@
HgfsConvertFromNtTimeNsec(struct timespe
uint64 ntTime) // IN: Time in Windows NT format
{
#ifdef __i386__
- uint32 sec;
- uint32 nsec;
+ uint64 sec64;
+ uint32 sec32, nsec;
+#endif
ASSERT(unixTime);
- /* We assume that time_t is 32bit */
- ASSERT_ON_COMPILE(sizeof (unixTime->tv_sec) == 4);
- /* Cap NT time values that are outside of Unix time's range */
+ if (sizeof (unixTime->tv_sec) == 4) {
+ /* Cap NT time values that are outside of Unix time's range */
- if (ntTime >= UNIX_S32_MAX) {
- unixTime->tv_sec = 0x7FFFFFFF;
- unixTime->tv_nsec = 0;
- return 1;
+ if (ntTime >= UNIX_S32_MAX) {
+ unixTime->tv_sec = 0x7FFFFFFF;
+ unixTime->tv_nsec = 0;
+ return 1;
+ }
}
-#else
- ASSERT(unixTime);
-#endif
if (ntTime < UNIX_EPOCH) {
unixTime->tv_sec = 0;
@@ -135,9 +133,15 @@
HgfsConvertFromNtTimeNsec(struct timespe
}
#ifdef __i386__
- Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
- unixTime->tv_sec = sec;
- unixTime->tv_nsec = nsec * 100;
+ if (sizeof (unixTime->tv_sec) == 4) {
+ Div643232(ntTime - UNIX_EPOCH, 10000000, &sec32, &nsec);
+ unixTime->tv_sec = sec32;
+ unixTime->tv_nsec = nsec * 100;
+ } else {
+ Div643264(ntTime - UNIX_EPOCH, 10000000, &sec64, &nsec);
+ unixTime->tv_sec = sec64;
+ unixTime->tv_nsec = nsec * 100;
+ }
#else
unixTime->tv_sec = (ntTime - UNIX_EPOCH) / 10000000;
unixTime->tv_nsec = ((ntTime - UNIX_EPOCH) % 10000000) * 100;
utils/open-vm-tools/patches/010-musl-120.patch
0 → 100644
浏览文件 @
fa96401f
--- a/lib/hgfs/hgfsUtil.c
+++ b/lib/hgfs/hgfsUtil.c
@@ -109,7 +109,7 @@
int
HgfsConvertFromNtTimeNsec(struct timespec *unixTime, // OUT: Time in UNIX format
uint64 ntTime) // IN: Time in Windows NT format
{
-#ifdef __i386__
+#if defined(__i386__) && !__USE_TIME_BITS64
uint32 sec;
uint32 nsec;
@@ -134,7 +134,7 @@
HgfsConvertFromNtTimeNsec(struct timespe
return -1;
}
-#ifdef __i386__
+#if defined(__i386__) && !__USE_TIME_BITS64
Div643232(ntTime - UNIX_EPOCH, 10000000, &sec, &nsec);
unixTime->tv_sec = sec;
unixTime->tv_nsec = nsec * 100;
--- a/lib/hgfsServer/hgfsServerLinux.c
+++ b/lib/hgfsServer/hgfsServerLinux.c
@@ -2573,8 +2573,12 @@
HgfsStatToFileAttr(struct stat *stats,
# define FMTTIMET "l"
# endif
#else
+#ifdef __USE_TIME_BITS64
+# define FMTTIMET __PRI64
+#else
# define FMTTIMET "l"
#endif
+#endif
LOG(4, "access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
"attr: %"FMTTIMET"d/%"FMT64"u\n",
stats->st_atime, attr->accessTime, stats->st_mtime, attr->writeTime,
utils/open-vm-tools/patches/010-warnings.patch
已删除
100644 → 0
浏览文件 @
999b2eec
--- a/lib/err/errPosix.c
+++ b/lib/err/errPosix.c
@@ -29,6 +29,7 @@
#endif
#include <errno.h>
+#include <stdio.h>
#include <string.h>
#include <locale.h>
--- a/lib/file/fileIOPosix.c
+++ b/lib/file/fileIOPosix.c
@@ -1741,7 +1741,7 @@
FileIOPreadvInternal(
* the library horizon this can go away.
*/
/* coverity[func_conv] */
- if (preadv64 == NULL) {
+ if (0) {
fret = FileIOPreadvCoalesced(fd, entries, numEntries, offset,
totalSize, &bytesRead);
break;
@@ -1882,7 +1882,7 @@
FileIOPwritevInternal(
* the library horizon this can go away.
*/
/* coverity[func_conv] */
- if (pwritev64 == NULL) {
+ if (0) {
fret = FileIOPwritevCoalesced(fd, entries, numEntries, offset,
totalSize, &bytesWritten);
break;
--- a/lib/hgfsServer/hgfsServerLinux.c
+++ b/lib/hgfsServer/hgfsServerLinux.c
@@ -32,6 +32,7 @@
#define _DARWIN_USE_64_BIT_INODE
#endif
+#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
@@ -2573,7 +2574,7 @@
HgfsStatToFileAttr(struct stat *stats,
# define FMTTIMET "l"
# endif
#else
-# define FMTTIMET "l"
+# define FMTTIMET PRId64
#endif
LOG(4, "access: %"FMTTIMET"d/%"FMT64"u \nwrite: %"FMTTIMET"d/%"FMT64"u \n"
"attr: %"FMTTIMET"d/%"FMT64"u\n",
@@ -5301,7 +5302,7 @@
HgfsWriteCheckIORange(off_t offset,
goto exit;
}
- LOG(6, "%s: File Size limits: 0x%"FMT64"x 0x%"FMT64"x\n",
+ LOG(6, "%s: File Size limits: 0x%llx 0x%llx\n",
__FUNCTION__, fileSize.rlim_cur, fileSize.rlim_max);
/*
--- a/services/plugins/gdp/gdpPlugin.c
+++ b/services/plugins/gdp/gdpPlugin.c
@@ -32,7 +32,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/eventfd.h>
-#include <sys/poll.h>
+#include <poll.h>
#include <unistd.h>
#endif
utils/open-vm-tools/patches/020-no-werror.patch
0 → 100644
浏览文件 @
fa96401f
--- a/configure.ac
+++ b/configure.ac
@@ -1227,7 +1227,6 @@
AC_C_VOLATILE
### General flags / actions
CFLAGS="$CFLAGS -Wall"
-CFLAGS="$CFLAGS -Werror"
# -Wno-unknown-pragmas is due to gcc not understanding '#pragma ident'
# in Xlib.h on OpenSolaris.
junhui93
@weixin_43788435
mentioned in commit
588eb592
·
6月 26, 2023
mentioned in commit
588eb592
mentioned in commit 588eb592384280aa697f2bed24bcae91bc58d5fb
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录