]> git.sur5r.net Git - openldap/commitdiff
Move declaration of st
authorJulio Sánchez Fernández <jsanchez@openldap.org>
Mon, 19 Apr 1999 17:56:48 +0000 (17:56 +0000)
committerJulio Sánchez Fernández <jsanchez@openldap.org>
Mon, 19 Apr 1999 17:56:48 +0000 (17:56 +0000)
libraries/libldbm/ldbm.c

index 678a7e5b3e9480c14d75e5ce6053ea7df129fbb7..0ce41481c8213a876c0c8826c69fa0edce2b1e47 100644 (file)
@@ -426,6 +426,9 @@ LDBM
 ldbm_open( char *name, int rw, int mode, int dbcachesize )
 {
        LDBM            db;
+#ifdef HAVE_ST_BLKSIZE
+               struct stat     st;
+#endif
 
        LDBM_LOCK;
 
@@ -436,7 +439,6 @@ ldbm_open( char *name, int rw, int mode, int dbcachesize )
 
 #ifdef HAVE_ST_BLKSIZE
        if ( dbcachesize > 0 && stat( name, &st ) == 0 ) {
-               struct stat     st;
                dbcachesize = (dbcachesize / st.st_blksize);
                gdbm_setopt( db, GDBM_CACHESIZE, &dbcachesize, sizeof(int) );
        }