解决gcc4.5编译L2TP一键安装包 openswan出错问题

错误大概是:

In file included from /home/users/z/rpm/BUILD/openswan-2.6.25/programs/addconn/addconn.c:51:0:
/home/users/z/rpm/BUILD/openswan-2.6.25/include/ipsecconf/confread.h:37:19: error: comparison between ‘enum keyword_string_config_field’ and ‘enum keyword_string_conn_field’
/home/users/z/rpm/BUILD/openswan-2.6.25/include/ipsecconf/confread.h:38:19: error: comparison between ‘enum keyword_numeric_config_field’ and ‘enum keyword_numeric_conn_field’
/home/users/z/rpm/BUILD/openswan-2.6.25/include/ipsecconf/confread.h:39:34: error: comparison between ‘enum keyword_string_config_field’ and ‘enum keyword_string_conn_field’
/home/users/z/rpm/BUILD/openswan-2.6.25/include/ipsecconf/confread.h:40:34: error: comparison between ‘enum keyword_numeric_config_field’ and ‘enum keyword_numeric_conn_field’
make3* [addconn.o] Error 1
make3: Leaving directory `/home/users/z/rpm/BUILD/openswan-2.6.25/OBJ.linux.i386/programs/addconn’
make2
[programs] Error 1
make2: Leaving directory `/home/users/z/rpm/BUILD/openswan-2.6.25/OBJ.linux.i386/programs’
make1
[programs] Error 1
make1: Leaving directory `/home/users/z/rpm/BUILD/openswan-2.6.25/OBJ.linux.i386′
make: *
 [programs] Error 2

 

这是个bug,打上补丁即可解决
https://www.openswan.org/issues/1108

补丁详细信息:

继续阅读解决gcc4.5编译L2TP一键安装包 openswan出错问题

vbs脚本自动发送邮件

function Send_mail(You_Account,You_Password,Send_Email,Send_Email2,Send_Topic,Send_Body,Send_Attachment) 
 'code by NetPatch 
 'VBS发送邮件参数说明 
 'You_Account:你的邮件帐号 
 'You_Password:你的邮件密码 
 'Send_Email: 主要邮件地址 
 'Send_Email2: 备用邮件地址 
 'Send_Topic: 邮件主题 
 'Send_Body: 邮件内容 
 'Send_Attachment:邮件附件 

 You_ID=Split(You_Account, "@", -1, vbTextCompare) 
 '帐号和服务器分离 
 MS_Space = "http://schemas.microsoft.com/cdo/configuration/" 
 '这个是必须要的,不过可以放心的事,不会通过微软发送邮件 
 Set Email = CreateObject("CDO.Message") 
 Email.From = You_Account 
 '这个一定要和发送邮件的帐号一样 
 Email.To = Send_Email '主要邮件地址 

 If Send_Email2 <> "" Then 
 Email.CC = Send_Email2 '备用邮件地址 
 End If 

 Email.Subject = Send_Topic '邮件主题 
 Email.Textbody = Send_Body '邮件内容 

 If Send_Attachment <> "" Then 
 Email.AddAttachment Send_Attachment '邮件附件 
 End If 

 With Email.Configuration.Fields 
 .Item(MS_Space&"sendusing") = 2 '发信端口 
 .Item(MS_Space&"smtpserver") = "smtp."&You_ID(1) 'SMTP服务器地址 
 .Item(MS_Space&"smtpserverport") = 25 'SMTP服务器端口 
 .Item(MS_Space&"smtpauthenticate") = 1 'cdobasec 
 .Item(MS_Space&"sendusername") = You_ID(0) '你的邮件帐号 
 .Item(MS_Space&"sendpassword") = You_Password '你的邮件密码 
 .Update 
 End With 
 Email.Send 
 '发送邮件 
 Set Email=Nothing 
 '关闭组件 

 Send_Mail=True 
 '如果没有任何错误信息,则表示发送成功,否则发送失败 
 If Err Then 
 Err.Clear 
 Send_Mail=False 
 End If 
 End Function 

 '以下是利用上面的函数发送带附件的邮件例子 
 If Send_Mail("[email protected]","YourID","收件人地址1","收件人地址2","主题","内容...","d:\test.zip")=True Then 
 'Wscript.Echo "发送成功" 
 Else 
 Wscript.Echo "发送失败" 
 End If