[haiku-commits] haiku: hrev46558 - in src/system: libroot/os kernel/fs

  • From: axeld@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 19 Dec 2013 01:52:44 +0100 (CET)

hrev46558 adds 2 changesets to branch 'master'
old head: 44d352cdb1a18481b711112f4bac6386414d5ac8
new head: e3e0255008199dcf8c13bbcb2ca0b4de61c92e76
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=e3e0255+%5E44d352c

----------------------------------------------------------------------------

c7cb9b2: delete_driver_settings.cpp: Get rid of the weak alias.
  
  As weak aliases are not supported on OS X, this caused problems when
  building Haiku on OS X, as this file is also used for the host tools.
  
  Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

e3e0255: rootfs.cpp: Replace undefined behaviour with offsetof.
  
  Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                     [ Jonathan Schleifer <js@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 6 insertions(+), 6 deletions(-)
src/system/kernel/fs/rootfs.cpp           |  2 +-
src/system/libroot/os/driver_settings.cpp | 10 +++++-----

############################################################################

Commit:      c7cb9b2f595838104e085124b79cd7983aa11d34
URL:         http://cgit.haiku-os.org/haiku/commit/?id=c7cb9b2
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 17:24:46 2013 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Thu Dec 19 00:52:33 2013 UTC

delete_driver_settings.cpp: Get rid of the weak alias.

As weak aliases are not supported on OS X, this caused problems when
building Haiku on OS X, as this file is also used for the host tools.

Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/system/libroot/os/driver_settings.cpp 
b/src/system/libroot/os/driver_settings.cpp
index 5f7130d..b126996b 100644
--- a/src/system/libroot/os/driver_settings.cpp
+++ b/src/system/libroot/os/driver_settings.cpp
@@ -953,8 +953,8 @@ get_driver_settings(void *handle)
 }
 
 
-// this creates an alias of the above function
-// unload_driver_settings() is the same as delete_driver_settings()
-extern "C" __typeof(unload_driver_settings) delete_driver_settings
-       __attribute__((weak, alias ("unload_driver_settings")));
-
+status_t
+delete_driver_settings(void *_handle)
+{
+       return unload_driver_settings(_handle);
+}

############################################################################

Revision:    hrev46558
Commit:      e3e0255008199dcf8c13bbcb2ca0b4de61c92e76
URL:         http://cgit.haiku-os.org/haiku/commit/?id=e3e0255
Author:      Jonathan Schleifer <js@xxxxxxxxxxx>
Date:        Tue Dec 17 23:29:08 2013 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Thu Dec 19 00:52:33 2013 UTC

rootfs.cpp: Replace undefined behaviour with offsetof.

Signed-off-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/system/kernel/fs/rootfs.cpp b/src/system/kernel/fs/rootfs.cpp
index 6f80a51..9c1db88 100644
--- a/src/system/kernel/fs/rootfs.cpp
+++ b/src/system/kernel/fs/rootfs.cpp
@@ -377,7 +377,7 @@ rootfs_mount(fs_volume* volume, const char* device, uint32 
flags,
        rw_lock_init(&fs->lock, "rootfs");
 
        fs->vnode_list_hash = hash_init(ROOTFS_HASH_SIZE,
-               (addr_t)&vnode->all_next - (addr_t)vnode, 
&rootfs_vnode_compare_func,
+               offsetof(rootfs_vnode, all_next), &rootfs_vnode_compare_func,
                &rootfs_vnode_hash_func);
        if (fs->vnode_list_hash == NULL) {
                err = B_NO_MEMORY;


Other related posts:

  • » [haiku-commits] haiku: hrev46558 - in src/system: libroot/os kernel/fs - axeld