openbsd-ports/security/sqlat/patches/patch-sqlquery_c
2002-09-24 02:21:43 +00:00

27 lines
869 B
Plaintext

$OpenBSD: patch-sqlquery_c,v 1.2 2002/09/24 02:21:44 mark Exp $
--- sqlquery.c.orig Mon Dec 3 10:08:30 2001
+++ sqlquery.c Sun Sep 22 23:32:40 2002
@@ -22,7 +22,6 @@
#include "util.h"
#include "constants.h"
#include "sqldumplogins.h"
-#include <getopt.h>
void usage(char **argv) {
@@ -63,11 +62,13 @@ TDSLOGIN *set_target_defaults(TDSLOGIN *
void doInterpret(TDSLOGIN *pLogin, char *pQuery) {
TDSSOCKET *pTds = NULL;
+ TDSCONTEXT *context = NULL;
char *pCmd;
pCmd = (char *) malloc ( 256 );
/* connect to the SQL server */
- if( (pTds = tds_connect(pLogin)) !=NULL ) {
+ context = tds_alloc_context();
+ if( (pTds = tds_connect(pLogin, context, NULL)) !=NULL ) {
fprintf(stderr, "SQLExec %s by <patrik.karlsson@ixsecurity.com>\n",
SQLTOOLS_VERSION);
fprintf(stderr, "----------------------------------------------------" \