VirtualBox

Changeset 80774 in vbox for trunk/src/VBox/ImageMounter


Ignore:
Timestamp:
Sep 13, 2019 11:17:18 AM (5 years ago)
Author:
vboxsync
Message:

vboximg-mount: Drop compile time depedency on libfuse/libosxfuse and use the IPRT runtime loader to resolve the required methods dynamically

Location:
trunk/src/VBox/ImageMounter/vboximg-mount
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ImageMounter/vboximg-mount/Makefile.kmk

    r76553 r80774  
    1919include $(KBUILD_PATH)/subheader.kmk
    2020
    21 ifeq ($(KBUILD_TARGET),darwin)
    22  VBOX_PATH_FUSE ?= $(lastword $(sort $(wildcard $(KBUILD_DEVTOOLS_TRG)/osxfuse/v*)))
    23  ifneq ($(VBOX_PATH_FUSE),)
    24   LIB_FUSE     := $(VBOX_PATH_FUSE)/lib/libosxfuse.dylib
    25   LIBPATH_FUSE := $(VBOX_PATH_FUSE)/lib
    26   FUSE_INCS    := $(VBOX_PATH_FUSE)/include/osxfuse
    27  else
    28   LIB_FUSE     := /usr/local/lib/libosxfuse.dylib
    29   LIBPATH_FUSE := /usr/local/lib
    30   FUSE_INCS    := /usr/local/include/osxfuse \
    31         /usr/local/include
    32  endif
    33 else
    34  LIB_FUSE := fuse
    35  FUSE_INCS := /usr/include
    36 endif
    37 
    3821#
    3922# vboximg-mount - Disk Image Flatting FUSE Program.
     
    5336    vboximgMedia.h \
    5437    vboximgOpts.h \
    55     SelfSizingTable.h
     38    SelfSizingTable.h \
     39    fuse.cpp
    5640
    5741vboximg-mount_LIBS = \
    5842        $(LIB_DDU) \
    59         $(LIB_RUNTIME) \
    60         $(LIB_FUSE)
    61 
    62 vboximg-mount_INCS = $(FUSE_INCS)
    63 #vboximg-mount_CXXFLAGS.darwin = -std=c++11
     43        $(LIB_RUNTIME)
    6444
    6545include $(FILE_KBUILD_SUB_FOOTER)
  • trunk/src/VBox/ImageMounter/vboximg-mount/vboximg-mount.cpp

    r80529 r80774  
    2929#endif
    3030#define MAX_READERS (INT32_MAX / 32)
    31 #include <fuse.h>
    3231#ifdef UNIX_DERIVATIVE
    3332#include <errno.h>
     
    8079#include <iprt/time.h>
    8180
     81#include "fuse.h"
    8282#include "vboximgCrypto.h"
    8383#include "vboximgMedia.h"
     
    934934        return RTMsgErrorExitFailure("VDInit failed, rc=%Rrc\n", rc);
    935935
     936    rc = RTFuseLoadLib();
     937    if (RT_FAILURE(rc))
     938        return RTMsgErrorExitFailure("Failed to load the fuse library, rc=%Rrc\n", rc);
     939
    936940    memset(&g_vboximgOps, 0, sizeof(g_vboximgOps));
    937941    g_vboximgOps.open        = vboximgOp_open;
     
    13301334        RTPrintf("\nvboximg-mount: Going into background...\n");
    13311335
    1332     rc = fuse_main(args.argc, args.argv, &g_vboximgOps, NULL);
     1336    rc = fuse_main_real(args.argc, args.argv, &g_vboximgOps, sizeof(g_vboximgOps), NULL);
    13331337
    13341338    int rc2 = RTVfsFileRelease(g_hVfsFileDisk);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette