fix type usage in unixodbc to match new type usage in unixodbc API
This commit is contained in:
parent
6ace470cfb
commit
68b0ca5e79
33
freeradius-unixodbc-type-change.patch
Normal file
33
freeradius-unixodbc-type-change.patch
Normal file
@ -0,0 +1,33 @@
|
||||
--- freeradius-server-2.1.3.orig/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/sql_unixodbc.c 2008-12-05 11:37:56.000000000 -0500
|
||||
+++ freeradius-server-2.1.3/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/sql_unixodbc.c 2009-02-24 09:51:23.000000000 -0500
|
||||
@@ -166,7 +166,8 @@
|
||||
*************************************************************************/
|
||||
static int sql_select_query(SQLSOCK *sqlsocket, SQL_CONFIG *config, char *querystr) {
|
||||
rlm_sql_unixodbc_sock *unixodbc_sock = sqlsocket->conn;
|
||||
- SQLINTEGER column, len;
|
||||
+ SQLINTEGER column;
|
||||
+ SQLLEN len;
|
||||
int numfields;
|
||||
int state;
|
||||
|
||||
@@ -184,7 +185,7 @@
|
||||
|
||||
for(column=1; column<=numfields; column++) {
|
||||
SQLColAttributes(unixodbc_sock->stmt_handle,((SQLUSMALLINT) column),SQL_COLUMN_LENGTH,NULL,0,NULL,&len);
|
||||
- unixodbc_sock->row[column-1] = (SQLCHAR*)rad_malloc((int)++len);
|
||||
+ unixodbc_sock->row[column-1] = (char*)rad_malloc((int)++len);
|
||||
SQLBindCol(unixodbc_sock->stmt_handle, column, SQL_C_CHAR, (SQLCHAR *)unixodbc_sock->row[column-1], len, NULL);
|
||||
}
|
||||
return 0;
|
||||
@@ -440,9 +441,9 @@
|
||||
static int sql_affected_rows(SQLSOCK *sqlsocket, SQL_CONFIG *config) {
|
||||
rlm_sql_unixodbc_sock *unixodbc_sock = sqlsocket->conn;
|
||||
long err_handle;
|
||||
- int affected_rows;
|
||||
+ SQLLEN affected_rows;
|
||||
|
||||
- err_handle = SQLRowCount(unixodbc_sock->stmt_handle, (SQLINTEGER *)&affected_rows);
|
||||
+ err_handle = SQLRowCount(unixodbc_sock->stmt_handle, &affected_rows);
|
||||
if (sql_state(err_handle, sqlsocket, config))
|
||||
return -1;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: High-performance and highly configurable free RADIUS server
|
||||
Name: freeradius
|
||||
Version: 2.1.3
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: GPLv2+ and LGPLv2+
|
||||
Group: System Environment/Daemons
|
||||
URL: http://www.freeradius.org/
|
||||
@ -12,6 +12,7 @@ Source102: freeradius-logrotate
|
||||
Source103: freeradius-pam-conf
|
||||
|
||||
Patch0: freeradius-radiusd-conf.patch
|
||||
Patch1: freeradius-unixodbc-type-change.patch
|
||||
|
||||
Obsoletes: freeradius-dialupadmin >= 2.0 freeradius-dialupadmin-ldap >= 2.0
|
||||
Obsoletes: freeradius-dialupadmin-mysql >= 2.0 freeradius-dialupadmin-postgresql >= 2.0
|
||||
@ -154,6 +155,7 @@ This plugin provides the unixODBC support for the FreeRADIUS server project.
|
||||
%prep
|
||||
%setup -q -n freeradius-server-%{version}
|
||||
%patch0 -p1 -b .conf
|
||||
%patch1 -p1 -b .unixodbc-type-change
|
||||
|
||||
%build
|
||||
%ifarch s390 s390x
|
||||
@ -521,6 +523,9 @@ fi
|
||||
%{_libdir}/freeradius/rlm_sql_unixodbc-%{version}.so
|
||||
|
||||
%changelog
|
||||
* Tue Feb 24 2009 John Dennis <jdennis@redhat.com> - 2.1.3-4
|
||||
- fix type usage in unixodbc to match new type usage in unixodbc API
|
||||
|
||||
* Thu Feb 19 2009 John Dennis <jdennis@redhat.com> - 2.1.3-3
|
||||
- add pointer to Red Hat documentation in docdir
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user