]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: befs: declare functions static
authorPetr Uzel <petr.uzel@suse.cz>
Sun, 22 Apr 2012 14:16:39 +0000 (16:16 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 24 May 2012 10:17:51 +0000 (12:17 +0200)
Since commit 0b0c231f64d02e682
(swapon: move generic code to swapon-common.c), if util-linux is
configured with --enable-static --disable-shared --enable-libmount-mount
options, the build fails with the following error:

  ...
  libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o switch_root switch_root.o
  /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid':
  /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid'
  swapon-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here
  collect2: ld returned 1 exit status
  /bin/sh ../libtool  --tag=CC   --mode=link gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2   -o flock flock.o strutils.o
  libtool: link: gcc -std=gnu99 -fsigned-char -ggdb -O1 -Wall -D_FORTIFY_SOURCE=2 -o pivot_root pivot_root.o
  make[2]: *** [swapon] Error 1
  make[2]: *** Waiting for unfinished jobs....
  /home/petr/upstream/util-linux/libblkid/src/.libs/libblkid.a(befs.o): In function `get_uuid':
  /home/petr/upstream/util-linux/libblkid/src/superblocks/befs.c:333: multiple definition of `get_uuid'
  swapoff-swapon-common.o:/home/petr/upstream/util-linux/sys-utils/swapon-common.c:99: first defined here

Fix by declaring befs funcitons static.

Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
libblkid/src/superblocks/befs.c

index 930429a58d2a15e151e8ae9c87031a7f5159fb34..a7f4317ba5bace2fdf94307f0a6e104da3134252 100644 (file)
@@ -122,7 +122,7 @@ struct bplustree_node {
        char            name[0];
 } __attribute__((packed));
 
-unsigned char *get_block_run(blkid_probe pr, const struct befs_super_block *bs,
+static unsigned char *get_block_run(blkid_probe pr, const struct befs_super_block *bs,
                                        const struct block_run *br, int fs_le)
 {
        return blkid_probe_get_buffer(pr,
@@ -135,7 +135,7 @@ unsigned char *get_block_run(blkid_probe pr, const struct befs_super_block *bs,
                                        << FS32_TO_CPU(bs->block_shift, fs_le));
 }
 
-unsigned char *get_custom_block_run(blkid_probe pr,
+static unsigned char *get_custom_block_run(blkid_probe pr,
                                const struct befs_super_block *bs,
                                const struct block_run *br,
                                int64_t offset, uint32_t length, int fs_le)
@@ -154,7 +154,7 @@ unsigned char *get_custom_block_run(blkid_probe pr,
                        length);
 }
 
-unsigned char *get_tree_node(blkid_probe pr, const struct befs_super_block *bs,
+static unsigned char *get_tree_node(blkid_probe pr, const struct befs_super_block *bs,
                                const struct data_stream *ds,
                                int64_t start, uint32_t length, int fs_le)
 {
@@ -230,7 +230,7 @@ unsigned char *get_tree_node(blkid_probe pr, const struct befs_super_block *bs,
        return NULL;
 }
 
-int32_t compare_keys(const char keys1[], uint16_t keylengths1[], int32_t index,
+static int32_t compare_keys(const char keys1[], uint16_t keylengths1[], int32_t index,
                        const char *key2, uint16_t keylength2, int fs_le)
 {
        const char *key1;
@@ -251,7 +251,7 @@ int32_t compare_keys(const char keys1[], uint16_t keylengths1[], int32_t index,
        return result;
 }
 
-int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs,
+static int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs,
                        const struct befs_inode *bi, const char *key, int fs_le)
 {
        struct bplustree_header *bh;
@@ -328,7 +328,7 @@ int64_t get_key_value(blkid_probe pr, const struct befs_super_block *bs,
        return 0;
 }
 
-int get_uuid(blkid_probe pr, const struct befs_super_block *bs,
+static int get_uuid(blkid_probe pr, const struct befs_super_block *bs,
                                        uint64_t * const uuid, int fs_le)
 {
        struct befs_inode *bi;