r23784: use the GPLv3 boilerplate as recommended by the FSF and the license text
[tprouty/samba.git] / source / smbd / dmapi.c
index b42b7d51f018391659b38d5eceb7d62c1a1d9c5b..127d1627cf05ba3058e5698d9a92979d14d74180 100644 (file)
@@ -6,7 +6,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
    
    This program is distributed in the hope that it will be useful,
@@ -15,8 +15,7 @@
    GNU General Public License for more details.
    
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
 #include "includes.h"
@@ -40,6 +39,8 @@ BOOL dmapi_have_session(void) { return False; }
 #include <sys/jfsdmapi.h>
 #elif defined(HAVE_SYS_DMAPI_H)
 #include <sys/dmapi.h>
+#elif defined(HAVE_DMAPI_H)
+#include <dmapi.h>
 #endif
 
 #define DMAPI_SESSION_NAME "samba"
@@ -150,7 +151,9 @@ retry:
 
        /* No session already defined. */
        if (dmapi_session == DM_NO_SESSION) {
-               err = dm_create_session(DM_NO_SESSION, DMAPI_SESSION_NAME,
+               err = dm_create_session(DM_NO_SESSION,
+                                       CONST_DISCARD(char *,
+                                                     DMAPI_SESSION_NAME),
                                        &dmapi_session);
                if (err < 0) {
                        DEBUGADD(DMAPI_TRACE,